Skip to content

Commit

Permalink
Parameterize username and password to container registry
Browse files Browse the repository at this point in the history
  • Loading branch information
GodVenn committed Apr 17, 2023
1 parent 6ff7aeb commit 4ff4cee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy_to_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
Registry: ghcr.io
ImageName: ${{ github.repository }}
Tag: ${{ github.sha }}
RegistryUsername: ${{ github.actor }}
secrets:
RegistryPassword: ${{ secrets.GITHUB_TOKEN }}

deploy:
name: Update deployment in Development
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy_to_staging.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update deployment in Aurora Dev
name: Update deployment in Aurora Staging

on:
release:
Expand All @@ -24,6 +24,9 @@ jobs:
Registry: auroraprodacr.azurecr.io
ImageName: robotics/flotilla
Tag: ${{ github.event.release.tag_name }}
RegistryUsername: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }}
secrets:
RegistryPassword: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }}

deploy:
name: Update deployment in Staging
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/publish_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ on:
ImageName:
required: true
type: string
RegistryUsername:
required: true
type: string
secrets:
RegistryPassword:
required: true

jobs:
build-and-push-container:
runs-on: ubuntu-latest
Expand All @@ -30,8 +37,8 @@ jobs:
uses: docker/login-action@v2
with:
registry: ${{ inputs.Registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ inputs.RegistryUsername }}
password: ${{ secrets.RegistryPassword }}

- name: Extract metadata (tags, labels) for Docker
id: meta
Expand Down

0 comments on commit 4ff4cee

Please sign in to comment.