Skip to content

Commit

Permalink
Update GitHub workflows to use contrib Docker user
Browse files Browse the repository at this point in the history
Updates all GitHub workflows to use the crossplane-contrib Docker user.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
  • Loading branch information
hasheddan committed Oct 5, 2022
1 parent 86e51d6 commit ed1cb72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -299,9 +299,9 @@ jobs:

- name: Login to Docker
uses: docker/#-action@v1
if: env.DOCKER_USR != ''
if: env.CONTRIB_DOCKER_USR != ''
with:
username: ${{ secrets.DOCKER_USR }}
username: ${{ secrets.CONTRIB_DOCKER_USR }}
password: ${{ secrets.DOCKER_PSW }}

- name: Login to Upbound
Expand All @@ -314,14 +314,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/master' && env.AWS_USR != '' && env.DOCKER_USR != ''
if: github.ref == 'refs/heads/master' && env.AWS_USR != '' && env.CONTRIB_DOCKER_USR != ''
run: make -j2 promote
env:
BRANCH_NAME: master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -33,17 +33,17 @@ jobs:

- name: Login to Docker
uses: docker/#-action@v1
if: env.DOCKER_USR != ''
if: env.CONTRIB_DOCKER_USR != ''
with:
username: ${{ secrets.DOCKER_USR }}
username: ${{ secrets.CONTRIB_DOCKER_USR }}
password: ${{ secrets.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 }}
CHANNEL: ${{ github.event.inputs.channel }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_USR }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PSW }}


0 comments on commit ed1cb72

Please # to comment.