Skip to content

New fix

New fix #51

Workflow file for this run

name: Build Docker Image - CI
on:
release:
types:
- published
push:
branches:
- main
- master
- 'release-\d.\d\d'
jobs:
build:
name: Build and push docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract branch name
shell: bash
if: contains(github.ref, "release-")

Check failure on line 23 in .github/workflows/ci-file.yaml

View workflow run for this annotation

GitHub Actions / Build Docker Image - CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci-file.yaml (Line: 23, Col: 13): Unexpected symbol: '"release-"'. Located at position 22 within expression: contains(github.ref, "release-")
run: |
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
version_digits=$(echo ${branch} | tr -d -c 0-9)
image_version=v$(echo ${version_digits} | cut -b 1).$(echo ${version_digits:1})
echo "image_version=${image_version}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Set up QEMU
run: |
ls -l
cat main/main.go
echo "Image pushed to ${{ steps.extract_branch.outputs.image_version }}"
echo "Variable is ${{ env.MY_VAR }}"
env:
MY_VAR: ${{ github.ref == 'ref/head/master' && 'latest' || steps.extract_branch.outputs.image_version }}
# uses: docker/setup-qemu-action@v3