Skip to content

Commit 2759c5a

Browse files
committed
fix: rc workflow
1 parent 48ae5fc commit 2759c5a

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/release-candidate.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
name: Publish Release Candidate
1010

1111
on:
12-
workflow_dispatch:
13-
inputs:
14-
nextVersion:
15-
description: 'specify the release version in the semver format v[major].[minor].[patch] e.g. v0.0.0'
16-
required: true
12+
workflow_dispatch: {}
1713

1814
# Releases need permissions to read and write the repository contents.
1915
# GitHub considers creating releases and uploading assets as writing contents.
@@ -25,22 +21,22 @@ jobs:
2521
release:
2622
runs-on: ubuntu-latest
2723
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
submodules: true
2828
- name: Set Version
2929
id: version
30-
run: echo "VERSION=fromPR-${{}}${{ github.event.inputs.nextVersion }}" >> $GITHUB_OUTPUT
30+
run: echo "version=v0.0.0-$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
3131
- name: Print Version Number
32-
run: echo "Effective version ${{ github.steps.version.outputs.VERSION }}"
32+
run: echo "Effective version ${{ steps.version.outputs.version }}"
3333

3434
- name: Setup Docker Buildx
35-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.4.0
35+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
3636
with:
3737
version: v0.15.1
3838
install: true
3939

40-
- name: Checkout code
41-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42-
with:
43-
submodules: true
4440

4541
- name: Fetch History
4642
run: git fetch --prune --unshallow
@@ -54,7 +50,7 @@ jobs:
5450
run: make vendor vendor.check
5551

5652
- name: Build Images
57-
run: make build VERSION=${{ github.steps.version.outputs.VERSION }}
53+
run: make build VERSION=${{ steps.version.outputs.version }}
5854
env:
5955
# We're using docker buildx, which doesn't actually load the images it
6056
# builds by default. Specifying --load does so.
@@ -70,7 +66,7 @@ jobs:
7066
password: ${{ secrets.GITHUB_TOKEN }}
7167

7268
- name: Publish Artifacts to DockerHub
73-
run: make publish VERSION=${{ github.steps.version.outputs.VERSION }}
69+
run: make publish VERSION=${{ steps.version.outputs.version }}
7470
env:
7571
DOCKER_REGISTRY: ${{ vars.REGISTRY_URL }}
7672
BUILD_REGISTRY: ${{ vars.REGISTRY_URL }}

0 commit comments

Comments
 (0)