From 268e64dd61df6c12aaa5cfd33112c1e6d2147e51 Mon Sep 17 00:00:00 2001 From: HubbeKing Date: Sun, 17 Oct 2021 19:17:13 +0300 Subject: [PATCH] Use a separate step to generate image tag --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d127322..92f5588 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,10 @@ jobs: - name: Check out repo uses: actions/checkout@v2 + - name: Generate image tag + id: tag + run: echo "::set-output name=sha8::$(git rev-parse --short HEAD)" + - name: Log into ghcr.io uses: docker/login-action@v1 with: @@ -50,7 +54,7 @@ jobs: with: context: ./${{ matrix.component }} file: Dockerfile - tags: ghcr.io/ekimekim/wubloader-${{ matrix.component }}:${GITHUB_SHA::8} + tags: ghcr.io/ekimekim/wubloader-${{ matrix.component }}:${{ steps.tag.outputs.sha8 }} push: true - name: Build ${{ matrix.component }} latest