@@ -22,38 +22,13 @@ jobs:
22
22
environment : ghcr:leanix-github-agent
23
23
24
24
steps :
25
- - name : Tag next version
26
- id : tag-action
27
- uses : K-Phoen/semver-release-action@master
28
- with :
29
- release_branch : main
30
- release_strategy : tag
31
- env :
32
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
-
34
- - name : Publish Release Draft
35
- uses : actions/github-script@v6.4.1
36
- if : (steps.tag-action.outputs.tag != '')
37
- with :
38
- github-token : ${{secrets.GITHUB_TOKEN}}
39
- script : |
40
- const tag = "${{ steps.tag-action.outputs.tag }}";
41
- const { data: releases } = await github.rest.repos.listReleases({
42
- owner: context.repo.owner,
43
- repo: context.repo.repo
44
- });
45
- const draftRelease = releases.find(release => release.tag_name === tag && release.draft === true);
46
- if (!draftRelease) {
47
- console.log(`No draft release found for tag ${tag}`);
48
- return;
49
- }
50
- await github.rest.repos.updateRelease({
51
- owner: context.repo.owner,
52
- repo: context.repo.repo,
53
- release_id: draftRelease.id,
54
- draft: false
55
- });
56
- console.log(`Published draft release for tag ${tag}`);
25
+ - name : Extract Docker image tag
26
+ id : extract_tag
27
+ run : |
28
+ TAG=${GITHUB_REF#refs/tags/}
29
+ CLEAN_TAG=${TAG//[^0-9.]/}
30
+ echo "Docker image tag: ${CLEAN_TAG}"
31
+ echo "::set-output name=tag::${CLEAN_TAG}"
57
32
58
33
- name : Checkout
59
34
uses : actions/checkout@v3
92
67
with :
93
68
context : .
94
69
push : true
95
- tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag-action .outputs.tag }}
70
+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.extract_tag .outputs.tag }}
96
71
labels : ${{ steps.meta.outputs.labels }}
97
72
98
73
- name : Generate artifact attestation
0 commit comments