Skip to content

fix: use tag pushes as trigger for image builds #43

fix: use tag pushes as trigger for image builds

fix: use tag pushes as trigger for image builds #43

Workflow file for this run

name: Build and deploy Docker images to GAR
on:
push:
tags: *

Check failure on line 4 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker.yml

Invalid workflow file

You have an error in your yaml syntax on line 4
workflow_dispatch:
inputs:
git_tag:
type: string
required: true
jobs:
determine-tag:
name: Determine tag to build
runs-on: ubuntu-latest
permissions: {}
outputs:
TAG: ${{ steps.determine.outputs.tag }}
steps:
- id: determine
run: |
# workflow_dispatch
if [[ "${{ github.event.inputs.git_tag }}" != "" ]]; then
echo "tag=${{ github.event.inputs.git_tag }}" >> $GITHUB_OUTPUT
# successful check_run from tag
elif [[ "${{ github.ref }}" != "" ]]; then
echo "tag=$(cut -d \/ -f3 <(echo '${{ github.ref }}'))" >> $GITHUB_OUTPUT
else
echo "Cannot determine tag"
exit 1
fi
autoconnect:
name: "Autoconnect: Build and push to GAR"
needs: [determine-tag]
permissions:
contents: read
id-token: write
uses: ./.github/workflows/build-and-push-image.yml
secrets: inherit
with:
binary: autoconnect
crate: autoconnect
image: autoconnect
tag: ${{ needs.determine-tag.outputs.TAG }}
autoendpoint:
name: "Autoendpoint: Build and push to GAR"
needs: [determine-tag]
permissions:
contents: read
id-token: write
uses: ./.github/workflows/build-and-push-image.yml
secrets: inherit
with:
binary: autoendpoint
crate: autoendpoint
image: autoendpoint
tag: ${{ needs.determine-tag.outputs.TAG }}