Skip to content

Commit e9640c3

Browse files
Merge pull request #476 from mcottontensor/branch_tag
Adding the branch name to the publish tags
2 parents 7c5689b + 8e64cc6 commit e9640c3

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

.github/workflows/publish-common-library-to-npm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ jobs:
3838
echo $package_content >> $GITHUB_OUTPUT
3939
echo 'EOF' >> $GITHUB_OUTPUT
4040
41+
- shell: bash
42+
id: extract_branch
43+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
44+
4145
- uses: actions/github-script@v5
4246
with:
4347
script: |
4448
github.rest.git.createRef({
4549
owner: context.repo.owner,
4650
repo: context.repo.repo,
47-
ref: 'refs/tags/lib-common-${{ fromJson(steps.get-package-json.outputs.json).version }}',
51+
ref: 'refs/tags/lib-common-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
4852
sha: context.sha
4953
})

.github/workflows/publish-container-images.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ jobs:
4040
echo $package_content >> $GITHUB_OUTPUT
4141
echo 'EOF' >> $GITHUB_OUTPUT
4242
43+
- shell: bash
44+
id: extract_branch
45+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
46+
4347
- uses: actions/github-script@v5
4448
with:
4549
script: |
4650
github.rest.git.createRef({
4751
owner: context.repo.owner,
4852
repo: context.repo.repo,
49-
ref: 'refs/tags/signalling-webserver-${{ fromJson(steps.get-package-json.outputs.json).version }}',
53+
ref: 'refs/tags/signalling-webserver-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
5054
sha: context.sha
5155
})

.github/workflows/publish-library-to-npm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ jobs:
3838
echo $package_content >> $GITHUB_OUTPUT
3939
echo 'EOF' >> $GITHUB_OUTPUT
4040
41+
- shell: bash
42+
id: extract_branch
43+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
44+
4145
- uses: actions/github-script@v5
4246
with:
4347
script: |
4448
github.rest.git.createRef({
4549
owner: context.repo.owner,
4650
repo: context.repo.repo,
47-
ref: 'refs/tags/lib-frontend-${{ fromJson(steps.get-package-json.outputs.json).version }}',
51+
ref: 'refs/tags/lib-frontend-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
4852
sha: context.sha
4953
})

.github/workflows/publish-sfu-image.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ jobs:
4141
echo $package_content >> $GITHUB_OUTPUT
4242
echo 'EOF' >> $GITHUB_OUTPUT
4343
44+
- shell: bash
45+
id: extract_branch
46+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
47+
4448
- uses: actions/github-script@v5
4549
with:
4650
script: |
4751
github.rest.git.createRef({
4852
owner: context.repo.owner,
4953
repo: context.repo.repo,
50-
ref: 'refs/tags/sfu-${{ fromJson(steps.get-package-json.outputs.json).version }}',
54+
ref: 'refs/tags/sfu-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
5155
sha: context.sha
5256
})

.github/workflows/publish-signalling-library-to-npm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ jobs:
3737
echo $package_content >> $GITHUB_OUTPUT
3838
echo 'EOF' >> $GITHUB_OUTPUT
3939
40+
- shell: bash
41+
id: extract_branch
42+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
43+
4044
- uses: actions/github-script@v5
4145
with:
4246
script: |
4347
github.rest.git.createRef({
4448
owner: context.repo.owner,
4549
repo: context.repo.repo,
46-
ref: 'refs/tags/lib-signalling-${{ fromJson(steps.get-package-json.outputs.json).version }}',
50+
ref: 'refs/tags/lib-signalling-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
4751
sha: context.sha
4852
})

.github/workflows/publish-ui-library-to-npm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ jobs:
3737
echo $package_content >> $GITHUB_OUTPUT
3838
echo 'EOF' >> $GITHUB_OUTPUT
3939
40+
- shell: bash
41+
id: extract_branch
42+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
43+
4044
- uses: actions/github-script@v5
4145
with:
4246
script: |
4347
github.rest.git.createRef({
4448
owner: context.repo.owner,
4549
repo: context.repo.repo,
46-
ref: 'refs/tags/lib-frontend-ui-${{ fromJson(steps.get-package-json.outputs.json).version }}',
50+
ref: 'refs/tags/lib-frontend-ui-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
4751
sha: context.sha
4852
})

0 commit comments

Comments
 (0)