forked from linz/topo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Workflow Test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "argo-submits/**.yaml" | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "18.x" | ||
|
||
- name: Setup kubectl | ||
uses: azure/setup-kubectl@v3 | ||
with: | ||
version: "latest" | ||
|
||
- name: AWS Configure | ||
uses: aws-actions/[email protected] | ||
with: | ||
aws-region: ap-southeast-2 | ||
mask-aws-account-id: true | ||
role-to-assume: ${{ secrets.AWS_CI_ROLE }} | ||
|
||
- name: Login to EKS | ||
run: | | ||
aws eks update-kubeconfig --name Workflow --region ap-southeast-2 --role-arn ${{ secrets.AWS_EKS_ROLE }} | ||
- name: Check EKS connection | ||
run: | | ||
kubectl get nodes | ||
- name: Install Argo | ||
run: | | ||
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.0-rc2/argo-linux-amd64.gz | ||
gunzip argo-linux-amd64.gz | ||
chmod +x argo-linux-amd64 | ||
./argo-linux-amd64 version | ||
- name: Get changed Files | ||
id: changed-files | ||
run: | | ||
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT | ||
- name: Submit workflow(s) | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.changed_files }}; do | ||
if [[ "$file" == *.yaml ]]; | ||
then | ||
if [[ "$file" == *argo-submits* ]]; | ||
then | ||
./argo-linux-amd64 submit --from wftmpl/publish-copy -n argo -f $file --generate-name test-mdavidson-gh-action- | ||
fi | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"source": "s3://linz-imagery-staging/test/sample/" | ||
"target": "s3://linz-workflow-artifacts/mdavidson/test-actions/t/" |