From 7b26f63377b0c1f15f6001ef850f74a2b4a6ad31 Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Tue, 4 Oct 2022 20:40:25 -0400 Subject: [PATCH] Update secrets for GitHub actions Signed-off-by: Jason Tang --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/promote.yml | 10 +++++----- Makefile | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cfee3fe..9c0e5c96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ env: # Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run # a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether # credentials have been provided before trying to run steps that need them. - DOCKER_USR: ${{ secrets.DOCKER_USR }} + CONTRIB_DOCKER_USR: ${{ secrets.CONTRIB_DOCKER_USR }} XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }} AWS_USR: ${{ secrets.AWS_USR }} @@ -304,10 +304,10 @@ jobs: - name: Login to Docker uses: docker/login-action@v1 - if: env.DOCKER_USR != '' + if: env.CONTRIB_DOCKER_USR != '' with: - username: ${{ secrets.DOCKER_USR }} - password: ${{ secrets.DOCKER_PSW }} + username: ${{ secrets.CONTRIB_DOCKER_USR }} + password: ${{ secrets.CONTRIB_DOCKER_PSW }} - name: Login to Upbound uses: docker/login-action@v1 @@ -319,14 +319,14 @@ jobs: - name: Publish Artifacts to S3 and Docker Hub run: make -j2 publish BRANCH_NAME=${GITHUB_REF##*/} - if: env.AWS_USR != '' && env.DOCKER_USR != '' + if: env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }} GIT_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Promote Artifacts in S3 and Docker Hub - if: github.ref == 'refs/heads/main' && env.AWS_USR != '' && env.DOCKER_USR != '' + if: github.ref == 'refs/heads/main' && env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' run: make -j2 promote env: BRANCH_NAME: main diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index abd5acff..a1e10b3b 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -15,7 +15,7 @@ env: # Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run # a step 'if env.AWS_USR' != ""', so we copy these to succinctly test whether # credentials have been provided before trying to run steps that need them. - DOCKER_USR: ${{ secrets.DOCKER_USR }} + CONTRIB_DOCKER_USR: ${{ secrets.CONTRIB_DOCKER_USR }} AWS_USR: ${{ secrets.AWS_USR }} jobs: @@ -33,13 +33,13 @@ jobs: - name: Login to Docker uses: docker/login-action@v1 - if: env.DOCKER_USR != '' + if: env.CONTRIB_DOCKER_USR != '' with: - username: ${{ secrets.DOCKER_USR }} - password: ${{ secrets.DOCKER_PSW }} + username: ${{ secrets.CONTRIB_DOCKER_USR }} + password: ${{ secrets.CONTRIB_DOCKER_PSW }} - name: Promote Artifacts in S3 and Docker Hub - if: env.AWS_USR != '' && env.DOCKER_USR != '' + if: env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != '' run: make -j2 promote BRANCH_NAME=${GITHUB_REF##*/} env: VERSION: ${{ github.event.inputs.version }} diff --git a/Makefile b/Makefile index 98a6f3f2..3374dd08 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ IMAGES = provider-kubernetes # ==================================================================================== # Setup XPKG -XPKG_REG_ORGS ?= xpkg.upbound.io/crossplane-contrib index.docker.io/crossplane-contrib +XPKG_REG_ORGS ?= xpkg.upbound.io/crossplane-contrib index.docker.io/crossplanecontrib # NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are # inferred. XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/crossplane-contrib