Skip to content

Commit

Permalink
fix: fix docker build tag
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Mar 15, 2022
1 parent 297d515 commit 0883c35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ 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:
- uses: actions/checkout@v2
- 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
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down Expand Up @@ -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 }}

2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"branch": "master",
"tagFormat": "${version}",
"tagFormat": "v${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down

0 comments on commit 0883c35

Please sign in to comment.