Repository navigation
fix(sheets): keep each sheet row on one line in text output #1041
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: docker | |
| on: | |
| pull_request: | |
| paths: | |
| - ".dockerignore" | |
| - ".github/workflows/docker.yml" | |
| - "Dockerfile" | |
| - "cmd/**" | |
| - "go.mod" | |
| - "go.sum" | |
| - "internal/**" | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Optional release tag to publish (e.g. v0.14.0)" | |
| required: false | |
| type: string | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Validate manual tag | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.tag != '' }} | |
| env: | |
| RELEASE_TAG: ${{ inputs.tag }} | |
| run: | | |
| if ! echo "$RELEASE_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then | |
| echo "::error::Invalid tag format: $RELEASE_TAG" | |
| exit 1 | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} | |
| - name: Verify Docker Go version | |
| run: make docker-version-check | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=ref,event=pr | |
| type=ref,event=tag | |
| type=raw,value=${{ inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.tag != '' }} | |
| type=raw,value=latest,enable=${{ (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-')) || (github.event_name == 'workflow_dispatch' && inputs.tag != '' && !contains(inputs.tag, '-')) }} | |
| - name: Build metadata | |
| id: build-meta | |
| env: | |
| RELEASE_TAG: ${{ inputs.tag }} | |
| run: | | |
| version="dev" | |
| if [[ -n "$RELEASE_TAG" ]]; then | |
| version="$RELEASE_TAG" | |
| elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then | |
| version="$GITHUB_REF_NAME" | |
| fi | |
| { | |
| echo "version=$version" | |
| echo "commit=${GITHUB_SHA::12}" | |
| echo "date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 | |
| - name: Login to GHCR | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.tag != '') }} | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image | |
| uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 | |
| with: | |
| context: . | |
| push: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.tag != '') }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| VERSION=${{ steps.build-meta.outputs.version }} | |
| COMMIT=${{ steps.build-meta.outputs.commit }} | |
| DATE=${{ steps.build-meta.outputs.date }} |