Skip to content

Commit

Permalink
adding secret to reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joshjohanning authored Aug 23, 2023
1 parent d255a01 commit b77df75
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
description: image tag
type: string
default: "Dockerfile"
secrets:
registry_password:
required: true

jobs:
docker-build:
Expand All @@ -34,7 +37,11 @@ jobs:

- name: Build the Docker image
run: docker build . --file ${{ inputs.dockerfile-path }} --tag ${{ inputs.image-repository }}/${{ inputs.image-name }}:${{ inputs.image-tag }}


# use cli instead of action to show secrets in reusable workflows
# - name: login to cr
# run: echo ${{ secrets.registry_password }} | docker login --username foo --password-stdin

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand Down

0 comments on commit b77df75

Please sign in to comment.