diff --git a/action.yml b/action.yml index d086d22..adcf839 100644 --- a/action.yml +++ b/action.yml @@ -146,6 +146,18 @@ runs: with: repository: ${{ inputs.repository }} + - name: Add build envars to Dockerfile + if: steps.build.outputs.triggered == 'true' + env: + dockerfile: ${{ steps.vars.outputs.build_file }} + shell: bash + run: | + # Add build envars to Dockerfile + echo "ENV BUILDER_IMAGE=ghcr.io/${{ github.repository }}/${{ inputs.package }}:${{ inputs.tag }}" >> ${{ env.dockerfile }} + echo "ENV BUILDER_PACKAGE=${{ inputs.package }}" >> ${{ env.dockerfile }} + echo "ENV BUILDER_REPO=${{ github.repository }}" >> ${{ env.dockerfile }} + echo "ENV BUILDER_TAG=${{ inputs.tag }}" >> ${{ env.dockerfile }} + - name: Set up Docker Buildx if: steps.build.outputs.triggered == 'true' uses: docker/setup-buildx-action@v3 @@ -156,7 +168,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'