1
- name : Tag
1
+ name : Tag release
2
2
3
3
on :
4
4
workflow_dispatch :
11
11
required : true
12
12
13
13
jobs :
14
- create-tag :
14
+ create-tag-build-and-pack :
15
15
runs-on : ubuntu-22.04
16
-
16
+ permissions :
17
+ contents : write
17
18
steps :
18
19
- name : Checkout
19
20
uses : actions/checkout@v2
23
24
with :
24
25
version : ${{ github.event.inputs.version }}
25
26
message : ${{ github.event.inputs.message }}
26
- token : ${{ secrets.GITHUB_TOKEN }}
27
+ token : ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name : CR authentication
30
+ uses : docker/login-action@v2
31
+ with :
32
+ registry : ghcr.io
33
+ username : ${{ github.actor }}
34
+ password : ${{ secrets.ACCESS_TOKEN }}
35
+
36
+ - name : Checkout
37
+ uses : actions/checkout@v3
38
+ with :
39
+ fetch-depth : 2
40
+ - name : Configure Git
41
+ run : |
42
+ git config user.name "$GITHUB_ACTOR"
43
+ git config user.email "$GITHUB_ACTOR@github.com"
44
+
45
+ - name : Set VERSION env
46
+ run : echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
47
+
48
+ - name : Setup QEMU
49
+ uses : docker/setup-qemu-action@v1
50
+ with :
51
+ platforms : all
52
+
53
+ - name : Setup Docker Buildx
54
+ uses : docker/setup-buildx-action@v1
55
+ with :
56
+ version : ${{ env.DOCKER_BUILDX_VERSION }}
57
+ install : true
58
+
59
+ - name : Setup Go
60
+ uses : actions/setup-go@v2
61
+ with :
62
+ go-version : ${{ env.GO_VERSION }}
63
+
64
+ - name : Find the Go Build Cache
65
+ id : go
66
+ run : echo "::set-output name=cache::$(make go.cachedir)"
67
+
68
+ - name : Cache the Go Build Cache
69
+ uses : actions/cache@v2
70
+ with :
71
+ path : ${{ steps.go.outputs.cache }}
72
+ key : ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
73
+ restore-keys : ${{ runner.os }}-build-publish-artifacts-
74
+
75
+ - name : Cache Go Dependencies
76
+ uses : actions/cache@v2
77
+ with :
78
+ path : .work/pkg
79
+ key : ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
80
+ restore-keys : ${{ runner.os }}-pkg-
81
+
82
+ - name : Vendor Dependencies
83
+ run : make vendor vendor.check
84
+
85
+ - name : Get make submodules
86
+ run : make submodules
87
+
88
+ - name : Process swagger.json
89
+ run : make process.scheme
90
+
91
+ - name : Install crossplane CLI
92
+ id : crossplane
93
+ run : curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | sh
94
+
95
+ - name : Build provider image
96
+ run : docker build -t ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }} ./cluster
97
+
98
+ - name : Build and push crossplane packages
99
+ run : ./crossplane xpkg build -f package -o provider-magento --embed-runtime-image ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }} && ./crossplane xpkg push -f provider-magento ${REGISTRY}/${{ github.repository }}/provider-magento:${{ env.VERSION }};
0 commit comments