From 147688797a6543ee100bcf609406a0d7d2cb46c2 Mon Sep 17 00:00:00 2001 From: Torstein Lundervold Nesheim Date: Mon, 17 Apr 2023 15:15:37 +0200 Subject: [PATCH] Change container registry username to secret --- .github/workflows/deploy_to_development.yml | 2 +- .github/workflows/deploy_to_staging.yml | 2 +- .github/workflows/publish_component.yml | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy_to_development.yml b/.github/workflows/deploy_to_development.yml index a4598872b..c4028d289 100644 --- a/.github/workflows/deploy_to_development.yml +++ b/.github/workflows/deploy_to_development.yml @@ -16,8 +16,8 @@ jobs: Registry: ghcr.io ImageName: ${{ github.repository }} Tag: ${{ github.sha }} - RegistryUsername: ${{ github.actor }} secrets: + RegistryUsername: ${{ github.actor }} RegistryPassword: ${{ secrets.GITHUB_TOKEN }} deploy: diff --git a/.github/workflows/deploy_to_staging.yml b/.github/workflows/deploy_to_staging.yml index 48c4b305c..da4331a14 100644 --- a/.github/workflows/deploy_to_staging.yml +++ b/.github/workflows/deploy_to_staging.yml @@ -24,8 +24,8 @@ jobs: Registry: auroraprodacr.azurecr.io ImageName: robotics/flotilla Tag: ${{ github.event.release.tag_name }} - RegistryUsername: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }} secrets: + RegistryUsername: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_APPLICATION_ID }} RegistryPassword: ${{ secrets.ROBOTICS_ACRPUSH_DOCKER_SECRET }} deploy: diff --git a/.github/workflows/publish_component.yml b/.github/workflows/publish_component.yml index 3d3a9d7de..0ca97b223 100644 --- a/.github/workflows/publish_component.yml +++ b/.github/workflows/publish_component.yml @@ -15,10 +15,9 @@ on: ImageName: required: true type: string + secrets: RegistryUsername: required: true - type: string - secrets: RegistryPassword: required: true @@ -37,7 +36,7 @@ jobs: uses: docker/login-action@v2 with: registry: ${{ inputs.Registry }} - username: ${{ inputs.RegistryUsername }} + username: ${{ secrets.RegistryUsername }} password: ${{ secrets.RegistryPassword }} - name: Extract metadata (tags, labels) for Docker