From 57e9231c5ee9e6acab58e317ed78e877117e5164 Mon Sep 17 00:00:00 2001 From: Dave Gudge Date: Fri, 10 Mar 2023 10:02:33 +0000 Subject: [PATCH] fix: Github Workflow: Docker Publish The workflow was failing with: ``` The workflow is not valid. .github/workflows/docker-publish.yml (Line: 22, Col: 14): Unexpected symbol: '|'. Located at position 12 within expression: github.ref | replace('refs/tags/', '') ``` The `set-output` command is deprecated, so the issue has been fixed by utilising the `github.ref_name` context to retrieve the version tag that triggered the workflow. > `github.ref_name`: The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, `feature-branch-1`. https://docs.github.com/en/actions/learn-github-actions/contexts --- .github/workflows/docker-publish.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index da7e99a5..134ecac0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -16,10 +16,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - - name: Extract Version Number - id: extract_version - run: echo "::set-output name=version::${{ github.ref | replace('refs/tags/', '') }}" - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -42,4 +38,4 @@ jobs: push: true tags: | ghcr.io/mrsked/mrsk:latest - ghcr.io/mrsked/mrsk:${{ steps.extract_version.outputs.version }} + ghcr.io/mrsked/mrsk:${{ github.ref_name }}