Skip to content

Commit 3436f95

Browse files
committed
error cuz of how the tag name is passed to the actions/create-release@v1 action. GitHub Actions workflows typically reference the tag as refs/tags/v1.0.0, but the actions/create-release expects just the tag name (e.g., v1.0.0), without the refs/tags/ prefix.
this can be fixed by stripping the refs/tags/ part from the github.ref when creating the release. Here’s how to modify the workflow to handle this correctly.
1 parent d76c6d2 commit 3436f95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
env:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
with:
68-
tag_name: ${{ github.ref }}
69-
release_name: Release ${{ github.ref }}
68+
tag_name: ${{ github.ref_name }} # Use the ref_name to get the tag name only
69+
release_name: Release ${{ github.ref_name }}
7070
body: |
7171
Release notes for this version.
7272
draft: false

0 commit comments

Comments
 (0)