-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
58 lines (57 loc) · 2.05 KB
/
action.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
name: "ArgoCD Apps Action"
description: "Github Action to update ArgoCD Applications"
branding:
icon: "chevrons-up"
color: "gray-dark"
inputs:
target_branch:
description: "target branch"
required: false
default: "main"
create_pr:
description: "create a PR if there are new updates"
required: false
default: "true"
labels:
description: "labels to add to the PR"
required: false
default: "github_actions, dependencies"
apps_folder:
description: "folder to look for the app of apps"
required: false
default: "apps/manifests"
skip_prerelease:
description: "if true skips semantic prerelease versions during automated upgrades"
required: false
default: "true"
runs:
using: composite
steps:
- name: Download ArgoCD Apps Action Binary
env:
ACTION_VERSION: "v1.3.5"
shell: bash
run: |
wget https://github.com/ironashram/argocd-apps-action/releases/download/${ACTION_VERSION}/argocd-apps-action-${ACTION_VERSION}-linux-amd64.tar.gz
wget https://github.com/ironashram/argocd-apps-action/releases/download/${ACTION_VERSION}/argocd-apps-action-${ACTION_VERSION}-linux-amd64.tar.gz.md5
echo "Verifying MD5 checksum"
md5sum argocd-apps-action-${ACTION_VERSION}-linux-amd64.tar.gz > checksum
grep $(cat argocd-apps-action-${ACTION_VERSION}-linux-amd64.tar.gz.md5) checksum
if [ $? -eq 0 ]; then
echo "Checksum verified"
tar -xvf argocd-apps-action-${ACTION_VERSION}-linux-amd64.tar.gz
chmod +x argocd-apps-action
mv argocd-apps-action /usr/local/bin/argocd-apps-action
else
echo "Checksum verification failed"
exit 1
fi
- name: Run the ArgoCD Apps Action
env:
INPUT_SKIP_PRERELEASE: ${{ inputs.skip_prerelease }}
INPUT_TARGET_BRANCH: ${{ inputs.target_branch }}
INPUT_CREATE_PR: ${{ inputs.create_pr }}
INPUT_APPS_FOLDER: ${{ inputs.apps_folder }}
INPUT_LABELS: ${{ inputs.labels }}
shell: bash
run: argocd-apps-action