-
Notifications
You must be signed in to change notification settings - Fork 14
39 lines (38 loc) · 1.3 KB
/
main.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
name: main
env:
ARGO_NAMESPACE: argo
ARGO_VERSION: v3.4.1
permissions:
packages: write
contents: read
on:
push:
branches:
- main
jobs:
publish:
runs-on: self-hosted
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: publish image and chart
run: |
echo "Install argo"
# Download the binary
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-amd64.gz
# Unzip
gunzip argo-linux-amd64.gz
# Make binary executable
chmod +x argo-linux-amd64
echo "commit sha ${GITHUB_SHA}"
./argo-linux-amd64 version --short
./argo-linux-amd64 submit .argo/publish.yaml \
--generate-name="${GITHUB_REPOSITORY_NAME_PART}-publish-${GITHUB_SHA_SHORT}-" \
-p appName="${GITHUB_REPOSITORY_NAME_PART}" \
-p branch="${GITHUB_REF_NAME}" \
-p containerRegistryURL="ghcr.io/konstructio/${GITHUB_REPOSITORY_NAME_PART}:${GITHUB_SHA_SHORT}" \
-p gitUrlNoProtocol="[email protected]:${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \
-p shortSha="${GITHUB_SHA_SHORT}" \
--wait --log