Skip to content

Commit e4db147

Browse files
authored
Merge pull request #14067 from rabbitmq/ci/tweak-oci-tags
ci: update project version in nightly OCI
2 parents 1850ff1 + 5a83ec9 commit e4db147

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/oci-make-nightly.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,27 @@ jobs:
2222
- main
2323
- v4.1.x
2424
- v4.0.x
25+
include:
26+
- branch: main
27+
project_version: 4.2.0
2528

2629
runs-on: ubuntu-latest
2730
steps:
2831
- name: Checkout
2932
uses: actions/checkout@v4
3033
with:
3134
ref: ${{ matrix.branch }}
35+
fetch-tags: true
36+
fetch-depth: 0
37+
filter: blob:none
38+
39+
- name: Determine closes tag
40+
id: tag
41+
if: matrix.branch != 'main'
42+
shell: bash
43+
run: |
44+
t=$(git describe --tags --abbrev=0 ${{ matrix.branch }})
45+
printf "project_version=%s\n" "${t:1}" | tee -a "$GITHUB_OUTPUT"
3246
3347
- name: Configure Erlang
3448
uses: erlef/setup-beam@v1
@@ -39,7 +53,7 @@ jobs:
3953
- name: make package-generic-unix
4054
id: make
4155
run: |
42-
make package-generic-unix PROJECT_VERSION=${{ matrix.branch }}+${{ github.sha }}
56+
make package-generic-unix PROJECT_VERSION=${{ matrix.project_version || steps.tag.outputs.project_version }}+${{ github.sha }}
4357
4458
- name: Upload package-generic-unix
4559
uses: actions/upload-artifact@v4
@@ -87,7 +101,7 @@ jobs:
87101
suffix=-otp${{ matrix.otp_version }}
88102
tags: |
89103
type=sha,format=long
90-
type=schedule,pattern=nightly.{{date 'YYYYMMDD'}},prefix=${{ matrix.branch }}+
104+
type=schedule,pattern=nightly.{{date 'YYYYMMDD'}},prefix=${{ matrix.branch }}-
91105
type=raw,value=${{ matrix.branch }}
92106
93107
- name: Set up QEMU

0 commit comments

Comments
 (0)