Skip to content

Commit

Permalink
feat: add build envars to Dockerfiles and images
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Sep 6, 2024
1 parent 1607b9f commit 68efbe3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ runs:
with:
repository: ${{ inputs.repository }}

# Add envars to Dockerfile
- name: Add build args and envars
if: steps.build.outputs.triggered == 'true'
shell: bash
run: |
echo "BUILDER_IMAGE=ghcr.io/${{ github.repository }}/${{ github.package }}:${{ inputs.target }}" >> $DOCKERFILE
echo "BUILDER_PACKAGE=${{ inputs.package }}" >> $DOCKERFILE
echo "BUILDER_REPO=${{ github.repository }}" >> $DOCKERFILE
echo "BUILDER_TAG=${{ inputs.target }}" >> $DOCKERFILE
- name: Set up Docker Buildx
if: steps.build.outputs.triggered == 'true'
uses: docker/setup-buildx-action@v3
Expand All @@ -156,7 +166,7 @@ runs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ inputs.token }}
password: ${{ inputs.token }}

- name: Build and push ${{ inputs.package }} Docker image
if: steps.build.outputs.triggered == 'true'
Expand Down

0 comments on commit 68efbe3

Please sign in to comment.