@@ -3,76 +3,47 @@ name: Create Draft Release
33on :
44 push :
55 tags :
6- - ' v*'
6+ - ' v*'
77
88jobs :
99 draft_release :
10- name : Create Draft Release
1110 runs-on : ubuntu-latest
1211 steps :
13- # - name: Set env
14- # run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
15- - name : Checkout the Repository
16- uses : actions/checkout@v4
12+ - uses : actions/checkout@v4
1713 with :
1814 fetch-depth : 0
1915 - name : Install Go
2016 uses : actions/setup-go@v5
2117 with :
2218 go-version : ' ^1.24'
23- # - name: generate release notes
24- # run: |
25- # make release-notes
2619 - name : Create Release Artifacts
27- run : |
28- make release
20+ run : make release
2921 - name : Create Release
3022 uses : softprops/action-gh-release@v2
3123 with :
3224 draft : true
3325 files : out/*.*
34- # body_path: _releasenotes/${{ env.RELEASE_TAG }}.md
3526
36- release_image :
37- name : Build and Push Release Image
27+ extract-meta :
3828 runs-on : ubuntu-latest
29+ outputs :
30+ tags : ${{ steps.meta.outputs.tags }}
31+ labels : ${{ steps.meta.outputs.labels }}
32+ ldflags : ${{ steps.version_info.outputs.LDFLAGS }}
3933 steps :
40- - name : Check out the repo
41- uses : actions/checkout@v4
42-
43- - name : Install Go
44- uses : actions/setup-go@v5
45- with :
46- go-version : ' ^1.24'
47-
48- - name : Create Licenses Report
49- run : |
50- make licenses-report
51-
52- - name : Login to GitHub Container Registry
53- 54- with :
55- registry : ghcr.io
56- username : ${{ github.actor }}
57- password : ${{ secrets.GITHUB_TOKEN }}
58-
59- - name : Extract Metadata (tags, labels) for Docker
34+ - uses : actions/checkout@v4
35+ 6036 id : meta
61- 6237 with :
6338 images : ghcr.io/telekom/cluster-api-ipam-provider-infoblox
64-
65- - name : Get Version Information
66- id : version_info
67- run : |
68- echo "LDFLAGS=$(hack/version.sh)" >> $GITHUB_OUTPUT
39+ - id : version_info
40+ run : echo "LDFLAGS=$(hack/version.sh)" >> $GITHUB_OUTPUT
6941
70- - name : Build and Push Docker Image
71- 72- with :
73- context : .
74- push : true
75- tags : ${{ steps.meta.outputs.tags }}
76- labels : ${{ steps.meta.outputs.labels }}
77- build-args : |
78- ldflags=${{ steps.version_info.outputs.LDFLAGS }}
42+ release_image :
43+ needs : extract-meta
44+ uses : ./.github/workflows/build-image.yaml
45+ with :
46+ image_tags : ${{ needs.extract-meta.outputs.tags }}
47+ labels : ${{ needs.extract-meta.outputs.labels }}
48+ build_args : |
49+ ldflags=${{ needs.extract-meta.outputs.ldflags }}
0 commit comments