generated from kubefirst/react-app-template
-
Notifications
You must be signed in to change notification settings - Fork 8
32 lines (30 loc) · 1.07 KB
/
trigger.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
name: trigger
env:
ARGO_NAMESPACE: argo
ARGO_VERSION: v3.4.1
on: workflow_dispatch
jobs:
trigger:
runs-on: self-hosted
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: trigger
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/trigger.yaml \
--generate-name="${GITHUB_REPOSITORY_NAME_PART}-trigger-${GITHUB_SHA_SHORT}-" \
-p appName="${GITHUB_REPOSITORY_NAME_PART}" \
-p branch="${GITHUB_REF_NAME}" \
-p gitUrlNoProtocol="[email protected]:${GITHUB_REPOSITORY_OWNER_PART_SLUG}" \
--wait --log