From 0883c3525277ab8f92184c110914fb7b89c8c369 Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Tue, 15 Mar 2022 08:38:15 +0100 Subject: [PATCH] fix: fix docker build tag --- .github/workflows/benchmark.yaml | 7 ++----- .github/workflows/docker-build.yaml | 13 +++++++++---- .releaserc | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 26fb645..6665fa7 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -12,11 +12,6 @@ permissions: jobs: benchmark: - container: - image: ghcr.io/aldor007/mort-base:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GHR_TOKEN }} name: Performance regression check runs-on: ubuntu-latest steps: @@ -24,6 +19,8 @@ jobs: - uses: actions/setup-go@v2 with: go-version: 1.16 + - name: install deps + run: ./scripts/install-deps.sh - name: install run: go mod vendor && go mod download - name: Benchmark diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 9a46e51..19215f9 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -16,9 +16,14 @@ jobs: name: Checkout uses: actions/checkout@v2 - - name: Set output - id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + - name: Extract tag name + id: tag + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const tag = await exec.getExecOutput('git', ['tag', '--points-at', 'HEAD') + return tag.trim().replace('v', ''); - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" @@ -46,5 +51,5 @@ jobs: tags: ghcr.io/aldor007/mort:latest, ghcr.io/aldor007/mort:${{ steps.vars.outputs.tag }} cache-from: type=registry,ref=ghcr.io/aldor007/mort:latest cache-to: type=inline - build-args: TAG=${{ steps.vars.outputs.tag }}, COMMIT=$GITHUB_SHA, DATE=${{ steps.date.outputs.date }} + build-args: TAG=${{ steps.tag.outputs.result }}, COMMIT=$GITHUB_SHA, DATE=${{ steps.date.outputs.date }} diff --git a/.releaserc b/.releaserc index b020134..836d66a 100644 --- a/.releaserc +++ b/.releaserc @@ -1,6 +1,6 @@ { "branch": "master", - "tagFormat": "${version}", + "tagFormat": "v${version}", "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator",