From ae7a98bccc45004bced9f53bf77665d2072e2842 Mon Sep 17 00:00:00 2001 From: paketo-bot Date: Thu, 4 Feb 2021 19:22:18 +0000 Subject: [PATCH] Update github-config to ebd5e2f --- .github/workflows/push-buildpackage.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-buildpackage.yml b/.github/workflows/push-buildpackage.yml index 4d925ef2..eea18247 100644 --- a/.github/workflows/push-buildpackage.yml +++ b/.github/workflows/push-buildpackage.yml @@ -34,12 +34,24 @@ jobs: sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://gcr.io/${{ github.repository }}:latest" - name: Push to DockerHub + id: push env: DOCKERHUB_USERNAME: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }} GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} run: | REPOSITORY="${GITHUB_REPOSITORY_OWNER/-/}/${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" # translates 'paketo-buildpacks/bundle-install' to 'paketobuildpacks/bundle-install' + IMAGE="index.docker.io/${REPOSITORY}" echo "${DOCKERHUB_PASSWORD}" | sudo skopeo login --username "${DOCKERHUB_USERNAME}" --password-stdin index.docker.io - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://index.docker.io/${REPOSITORY}:${{ steps.event.outputs.tag }}" - sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://index.docker.io/${REPOSITORY}:latest" + sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:${{ steps.event.outputs.tag }}" + sudo skopeo copy "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" "docker://${IMAGE}:latest" + echo "::set-output name=image::${IMAGE}" + echo "::set-output name=digest::$(sudo skopeo inspect "oci-archive:${GITHUB_WORKSPACE}/buildpackage.cnb" | jq -r .Digest)" + + - name: Register with CNB Registry + uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:main + with: + id: ${{ github.repository }} + version: ${{ steps.event.outputs.tag }} + address: ${{ steps.push.outputs.image }}@${{ steps.push.outputs.digest }} + token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}