From de6fc5e5e5eadb225d28a4045137f86954487b67 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 22:14:27 +0300 Subject: [PATCH 01/21] ci: add action lint workflow --- .github/workflows/action-lint.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/action-lint.yaml diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml new file mode 100644 index 0000000..4100154 --- /dev/null +++ b/.github/workflows/action-lint.yaml @@ -0,0 +1,13 @@ +name: Action Lint + +on: + pull_request: + +jobs: + action-lint: + runs-on: ubuntu-latest + steps: + - name: actionlint + uses: raven-actions/actionlint@v2 + with: + files: ".github/workflows/*.yml, .github/workflows/*.yaml, actions/**/*.yml, actions/**/*.yaml" From 4405f77c210d56c2b61d39528d55b8927d604dd7 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 22:23:45 +0300 Subject: [PATCH 02/21] fix: add permissions to action lint workflow and checkout code --- .github/workflows/action-lint.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 4100154..3e73ec6 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -3,10 +3,15 @@ name: Action Lint on: pull_request: +permissions: + pull-requests: write + jobs: action-lint: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v5 - name: actionlint uses: raven-actions/actionlint@v2 with: From 9111449f0e7d699d139831b6d4af578eaf14003e Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 22:31:45 +0300 Subject: [PATCH 03/21] chore: pass github token to actionlint action --- .github/workflows/action-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 3e73ec6..ddd30f9 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -15,4 +15,5 @@ jobs: - name: actionlint uses: raven-actions/actionlint@v2 with: + github_token: ${{ secrets.GH_PAT }} files: ".github/workflows/*.yml, .github/workflows/*.yaml, actions/**/*.yml, actions/**/*.yaml" From 27e5600eafe132e73411e96b23fb2522398a2f34 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 22:40:19 +0300 Subject: [PATCH 04/21] chore: check devops-actions action lint action --- .github/workflows/action-lint.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index ddd30f9..aac2c05 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -4,6 +4,7 @@ on: pull_request: permissions: + contents: read pull-requests: write jobs: @@ -13,7 +14,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - name: actionlint - uses: raven-actions/actionlint@v2 - with: - github_token: ${{ secrets.GH_PAT }} - files: ".github/workflows/*.yml, .github/workflows/*.yaml, actions/**/*.yml, actions/**/*.yaml" + uses: devops-actions/actionlint@v0.1.9 From 1b8e99769033ff4c69a331e565a2a6e4af828b94 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 22:42:57 +0300 Subject: [PATCH 05/21] chore: check older action version --- .github/workflows/action-lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index aac2c05..67b6689 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -12,6 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v4 - name: actionlint - uses: devops-actions/actionlint@v0.1.9 + uses: devops-actions/actionlint@v0.1.3 From 4992a30b792560eba2f83a6ffe642e62df1f9b71 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:10:45 +0300 Subject: [PATCH 06/21] ci: check reviewdog actionlint action --- .github/workflows/action-lint.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 67b6689..3d09374 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -4,7 +4,6 @@ on: pull_request: permissions: - contents: read pull-requests: write jobs: @@ -12,6 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: actionlint - uses: devops-actions/actionlint@v0.1.3 + uses: reviewdog/action-actionlint@v1.65.2 + with: + github_token: ${{ secrets.GH_PAT }} + reporter: github-pr-check + actionlint_flags: ".github/workflows/*.yml, .github/workflows/*.yaml, actions/**/*.yml, actions/**/*.yaml" From c9ac1f05e81d02423ef3a380fdad493b5480db30 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:12:44 +0300 Subject: [PATCH 07/21] chore: change checkout version --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 3d09374..32ac7bf 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v4 - name: actionlint uses: reviewdog/action-actionlint@v1.65.2 with: From ad2d9a674e1ec2871f5e2e961f8e933d30a6e4d9 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:14:48 +0300 Subject: [PATCH 08/21] chore: remove some directories --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 32ac7bf..39f686e 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,4 +17,4 @@ jobs: with: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-check - actionlint_flags: ".github/workflows/*.yml, .github/workflows/*.yaml, actions/**/*.yml, actions/**/*.yaml" + actionlint_flags: ".github/workflows/*.yml, .github/workflows/*.yaml" From c861c365a70f4d1dc2831247eebc855c71de56c2 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:16:03 +0300 Subject: [PATCH 09/21] chore: edit directories for search --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 39f686e..a85ae97 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,4 +17,4 @@ jobs: with: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-check - actionlint_flags: ".github/workflows/*.yml, .github/workflows/*.yaml" + actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml actions/**/*.yml actions/**/*.yaml" From 6dd8fd3c02c335ff06769d93a85adca61b71ed96 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:16:46 +0300 Subject: [PATCH 10/21] chore: directories --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index a85ae97..129ad42 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,4 +17,4 @@ jobs: with: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-check - actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml actions/**/*.yml actions/**/*.yaml" + actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" From f41515e4d6bb1686ba2bba29677036f5d0a8bf10 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Mon, 8 Sep 2025 23:18:34 +0300 Subject: [PATCH 11/21] chore: set fail level to error --- .github/workflows/action-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 129ad42..4716513 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,4 +17,5 @@ jobs: with: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-check + fail_level: error actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" From 12d1feae1b66f9d32793975db4be45d50a260b7b Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:17:11 +0300 Subject: [PATCH 12/21] ci: add content read permissions for action-lint workflow --- .github/workflows/action-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 4716513..f2d19d8 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -4,6 +4,7 @@ on: pull_request: permissions: + contents: read pull-requests: write jobs: From fea600113715e8a7445624d46f1e343797f12f28 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:21:28 +0300 Subject: [PATCH 13/21] ci: change from reviewdog comment to review reporter --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index f2d19d8..8b74c14 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,6 +17,6 @@ jobs: uses: reviewdog/action-actionlint@v1.65.2 with: github_token: ${{ secrets.GH_PAT }} - reporter: github-pr-check + reporter: github-pr-review fail_level: error actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" From bf5da0c591e6918231cb56244d0e333b67d50c2d Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:22:43 +0300 Subject: [PATCH 14/21] chore: add actions folder to action-lint workflow check --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 8b74c14..f7e427f 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -19,4 +19,4 @@ jobs: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-review fail_level: error - actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" + actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml actions/**/*.yml actions/**/*.yaml" From aecc6ebb2e10c57510f0dd1c0f604fe02db159e3 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:35:54 +0300 Subject: [PATCH 15/21] chore: bad yaml for check --- .github/workflows/bad.yaml | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/bad.yaml diff --git a/.github/workflows/bad.yaml b/.github/workflows/bad.yaml new file mode 100644 index 0000000..fd9e1dc --- /dev/null +++ b/.github/workflows/bad.yaml @@ -0,0 +1,61 @@ +name: Build and push artifacts + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + pull-requests: write + +jobs: + Artifactory_Login: + uses: MapColonies/shared-workflows/actions/artifactory-login@artifactory-login-v1.0.0 + with: + registry: ACR_URL + username: ACR_PUSH_USER + password: ACR_PUSH_TOKEN + + Build_Docker_Image: + uses: MapColonies/shared-workflows/actions/build-docker@build-docker-v1.1.0 + with: + # for example + # domain: infra + domain: YOUR-DOMAIN + registry: ACR_URL + + Push_Docker_Image: + uses: MapColonies/shared-workflows/actions/push-docker@push-docker-v1.0.1 + with: + # for example + # image_name: scaler + # image_tag: v1.0.0 + image_name: DOCKER_IMAGE_NAME + image_tag: DOCKER_IMAGE_TAG + + + Build_and_Push_Helm_Chart: + uses: MapColonies/shared-workflows/actions/build-and-push-helm@build-and-push-helm-v1.0.1 + with: + # for example + # context: ./infra/monitoring + # domain: infra + context: YOUR-PATH + domain: YOUR-DOMAIN + registry: ACR_URL + + update_artifacts_file: + uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1 + with: + # Example: + # domain: infra + # artifact_name: sftpgo + # artifact_tag: v1.2.3 + # type: docker + domain: YOUR-DOMAIN + artifact_name: ARTIFACT_NAME + artifact_tag: ARTIFACT_TAG + type: ARTIFACT_TYPE + registry: ACR_URL + github_token: YOUR_GITHUB_TOKEN From 220fcb7ba3341c3bb9bfaa2138fd88c454fa9700 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:36:49 +0300 Subject: [PATCH 16/21] chore: remove unsupported paths --- .github/workflows/action-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index f7e427f..8b74c14 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -19,4 +19,4 @@ jobs: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-review fail_level: error - actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml actions/**/*.yml actions/**/*.yaml" + actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" From 8feab2347a07cf28f6a1687fc0bca999d403dfc3 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:39:48 +0300 Subject: [PATCH 17/21] ci: remove actionlint_flags --- .github/workflows/action-lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index 8b74c14..aca7653 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -19,4 +19,3 @@ jobs: github_token: ${{ secrets.GH_PAT }} reporter: github-pr-review fail_level: error - actionlint_flags: ".github/workflows/*.yml .github/workflows/*.yaml" From 2566e68b825465b3e945609efeaa9e5beb69afff Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:51:15 +0300 Subject: [PATCH 18/21] chore: remove reporter and fail_level --- .github/workflows/action-lint.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index aca7653..f74eb62 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -17,5 +17,3 @@ jobs: uses: reviewdog/action-actionlint@v1.65.2 with: github_token: ${{ secrets.GH_PAT }} - reporter: github-pr-review - fail_level: error From 7366c59c3f764f48f5b8171ca1644a343feaa354 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 16:57:22 +0300 Subject: [PATCH 19/21] ci: checkout PR branch --- .github/workflows/action-lint.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index f74eb62..fa4c7da 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} - name: actionlint uses: reviewdog/action-actionlint@v1.65.2 with: From 8582faff6c8e78380667079c19f302af98d175c8 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 17:00:11 +0300 Subject: [PATCH 20/21] chore: set reporter --- .github/workflows/action-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index fa4c7da..a92c034 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -19,3 +19,4 @@ jobs: uses: reviewdog/action-actionlint@v1.65.2 with: github_token: ${{ secrets.GH_PAT }} + reporter: github-pr-review From acaf1fd182432f03576e98b1c44adfe5210557b2 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Wed, 10 Sep 2025 17:01:44 +0300 Subject: [PATCH 21/21] ci: update permissions --- .github/workflows/action-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-lint.yaml b/.github/workflows/action-lint.yaml index a92c034..bb1bc55 100644 --- a/.github/workflows/action-lint.yaml +++ b/.github/workflows/action-lint.yaml @@ -4,6 +4,7 @@ on: pull_request: permissions: + checks: write contents: read pull-requests: write