-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (54 loc) · 1.66 KB
/
build_v210.yaml
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
name: build_v210
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- patches-argo-cd-v2.10/**
- patches-gitops-engine-v2.2.0/**
- VERSION_210
- .github/workflows/build_v210.yaml
permissions:
contents: write
id-token: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: install stgit
shell: bash
run: |
sudo apt-get install -y stgit
git config --global user.name "Chanwit Kaewkasi"
git config --global user.email "chanwit@gmail.com"
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Prepare
id: prep
run: |
VERSION="${{ steps.branch-name.outputs.current_branch }}-${GITHUB_SHA::8}"
echo ::set-output name=VERSION::${VERSION}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build v2.10
run: |
ln -s VERSION_210 VERSION
ln -s patches-argo-cd-v2.10 patches-argo-cd
ln -s patches-gitops-engine-v2.2.0 patches-gitops-engine
rm -rf argo-cd || true
bash -x ./init.sh
source ./VERSION
VERSION=${BASE_VERSION}-${SUFFIX_VERSION}-${{ steps.prep.outputs.VERSION }}
( cd argo-cd && IMAGE_NAMESPACE=ghcr.io/flux-subsystem-argo/fsa IMAGE_TAG=$VERSION DOCKER_PUSH=true make image )
unlink patches-argo-cd
unlink VERSION