-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 1.65 KB
/
Copy pathbuild-release.yml
File metadata and controls
65 lines (63 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build and Release Website
on:
push:
tags:
- release*
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: Azure
steps:
-
name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
-
name: 'Az CLI login'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
-
name: 'Run Azure CLI commands'
run: |
az acr login -n izroll; \
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: izroll.azurecr.io/izroll-server:${{github.ref_name}}
-
name: OpenShift Tools Installer
uses: redhat-actions/openshift-tools-installer@v1
with:
source: "github"
kn: "latest"
-
uses: azure/setup-kubectl@v2.0
id: install
-
uses: azure/login@v1.4.3
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
-
uses: azure/aks-set-context@v2.0
with:
resource-group: "izroll-dev"
cluster-name: "krustlet"
-
run: kn service update izroll-server --image izroll.azurecr.io/izroll-server:${{github.ref_name}}