Skip to content

Commit

Permalink
Move secrets to inputs
Browse files Browse the repository at this point in the history
Followed docker/login-action pattern
  • Loading branch information
BronzBierd committed Dec 18, 2024
1 parent ae99cab commit dc2b39e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ inputs:
type: string
description: The docker image tag
required: true
artifactory_username:
type: string
description: The Artifactory username
required: true
artifactory_password:
type: string
description: The Artifactory password
required: true
artifactory_repo:
type: string
description: The Artifactory repository to push the image to
Expand Down Expand Up @@ -50,8 +58,8 @@ runs:
uses: docker/login-action@v3
with:
registry: ${{ inputs.artifactory_repo }}
username: ${{ secrets.ARTIFACTORY_USERNAME }}
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
username: ${{ inputs.artifactory_username }}
password: ${{ inputs.artifactory_password }}

- name: Setup Image Metadata
id: meta
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cd-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
with:
image_name: ${{ env.IMAGE_NAME }}
image_tag: ${{ env.IMAGE_TAG_PREFIX }}-${{ steps.short_sha.outputs.SHORT_SHA }}
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
artifactory_repo: ${{ env.ARTIFACTORY_REPO }}
artifactory_image_path: ${{ env.ARTIFACTORY_IMAGE_PATH }}
build_dockerfile: ${{ env.BUILD_DOCKERFILE }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cd-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
with:
image_name: ${{ env.IMAGE_NAME }}
image_tag: ${{ env.IMAGE_TAG_PREFIX }}-${{ steps.short_sha.outputs.SHORT_SHA }}
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
artifactory_repo: ${{ env.ARTIFACTORY_REPO }}
artifactory_image_path: ${{ env.ARTIFACTORY_IMAGE_PATH }}
build_dockerfile: web/Dockerfile.release
Expand Down

0 comments on commit dc2b39e

Please sign in to comment.