forked from tucker01/jenkins-nvm-keytar
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (93 loc) · 3.07 KB
/
ci.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: ci
on:
push:
branches:
- 'master'
workflow_dispatch:
schedule:
- cron: '0 12 * * 0'
env:
MAIN_NODE_VERSION: 18
jobs:
build-and-deploy-x64:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push
id: build
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64
build-args: |
IMAGE_VERSION_ARG=${{ matrix.node }}
tags: |
awharn/jenkins-nvm-keytar:${{ matrix.node }}
ghcr.io/awharn-docker/jenkins-nvm-keytar:${{ matrix.node }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'awharn/jenkins-nvm-keytar:latest' || '' }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'ghcr.io/awharn-docker/jenkins-nvm-keytar:latest' || '' }}
- name: Image Digest
run: echo ${{ steps.build.outputs.digest }}
build-and-deploy-arm:
runs-on: fastarm
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: false
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false
- name: Build & Push
id: build
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/arm64
build-args: |
IMAGE_VERSION_ARG=${{ matrix.node }}
tags: |
awharn/jenkins-nvm-keytar-arm:${{ matrix.node }}
ghcr.io/awharn-docker/jenkins-nvm-keytar-arm:${{ matrix.node }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'awharn/jenkins-nvm-keytar-arm:latest' || '' }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'ghcr.io/awharn-docker/jenkins-nvm-keytar-arm:latest' || '' }}
builder: ${{ steps.builder.outputs.name }}
- name: Image Digest
run: echo ${{ steps.build.outputs.digest }}
update-downstream:
runs-on: ubuntu-20.04
needs: [build-and-deploy-x64, build-and-deploy-arm]
steps:
- name: Update Downstream
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: gh workflow run -R awharn-docker/jenkins-nvm-zowe-cli -r master ci.yml