From 13ff44608ca3e523dc4ba7442b4007de4206276c Mon Sep 17 00:00:00 2001 From: Vemund Gaukstad Date: Fri, 11 Oct 2024 12:08:58 +0200 Subject: [PATCH] fix(ghrunner): fix release pipeline for self-hosted runner (#994) * Altinn has uppercase, thats not allowed in ghcr.io * Remove ghrunner- prefix from image tag --------- Co-authored-by: tjololo <1145298+tjololo@users.noreply.github.com> Co-authored-by: Renato Monteiro <45536168+monteiro-renato@users.noreply.github.com> --- .github/workflows/gh-runner-release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-runner-release.yml b/.github/workflows/gh-runner-release.yml index 70881c06..907096ec 100644 --- a/.github/workflows/gh-runner-release.yml +++ b/.github/workflows/gh-runner-release.yml @@ -14,11 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Get version from tags - id: version + - name: Get variables from tags + id: vars run: | - tag=${GITHUB_REF/refs\/tags\//} + tag=${GITHUB_REF/refs\/tags\/ghrunner-/} echo "version=${tag%-demo}" >> $GITHUB_OUTPUT + echo "reponame=${GITHUB_REPOSITORY,,}" >>${GITHUB_OUTPUT} - name: Get Git commit timestamps run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV - name: Set up QEMU @@ -38,6 +39,6 @@ jobs: context: ./infrastructure/images/gh-runner push: true platforms: linux/amd64,linux/arm64 - tags: ghcr.io/${{ github.repository }}/gh-runner:v${{ steps.version.outputs.version }} + tags: ghcr.io/${{ steps.vars.outputs.reponame }}/gh-runner:v${{ steps.vars.outputs.version }} env: - SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} \ No newline at end of file + SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}