From b915f2aae98bc1aead0f97ed54d5675b727e802b Mon Sep 17 00:00:00 2001 From: Diego Mauricio Lagos Date: Mon, 27 Jan 2025 12:14:20 +0100 Subject: [PATCH 1/3] action: added packages write and updated action with github token for maven release --- .github/workflows/flow-snapshot-docker.yml | 18 ++++++++++++------ force-release | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/flow-snapshot-docker.yml b/.github/workflows/flow-snapshot-docker.yml index 090afe0..618ac28 100644 --- a/.github/workflows/flow-snapshot-docker.yml +++ b/.github/workflows/flow-snapshot-docker.yml @@ -21,9 +21,9 @@ on: required: false default: 'true' argocd_target_branch: - description: 'argocd target branch name' - required: false - default: 'main' + description: 'argocd target branch name' + required: false + default: 'main' postman_branch: description: postman branch name' required: false @@ -33,6 +33,10 @@ env: # branch choosed by workflow_dispatch or by push event CURRENT_BRANCH: ${{ github.event.inputs.branch || github.ref_name }} +permissions: + packages: write + contents: read + jobs: checkout: name: 🔖 Checkout Repository @@ -56,9 +60,11 @@ jobs: - name: Run Snapshot Docker Build/Push # https://github.com/pagopa/github-actions-template/releases/tag/v2.0.0 - uses: pagopa/github-actions-template/payments-flow-docker-snapshot@b825ee193430395706a4a7e580b8435bdded0227 + uses: pagopa/github-actions-template/payments-flow-docker-snapshot@fix-maven-package-read with: current_branch: ${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} azure-devops-trigger: name: 🅰️ Azure DevOps Pipeline Trigger @@ -79,8 +85,8 @@ jobs: azure_devops_pat: ${{ secrets.AZURE_DEVOPS_TOKEN }} azure_template_parameters: | { - "APPS_TOP": "[one-color]", + "APPS_TOP": "[template]", "ARGOCD_TARGET_BRANCH": "${{ github.event.inputs.argocd_target_branch }}", "POSTMAN_BRANCH": "${{ github.event.inputs.postman_branch }}", - "TRIGGER_MESSAGE": "p4pa-auth" + "TRIGGER_MESSAGE": "template" } diff --git a/force-release b/force-release index dd3467d..efffd3b 100644 --- a/force-release +++ b/force-release @@ -1 +1 @@ -1623 +1214 From 52613e18104b39fd7fab3ee19308c78a20953c78 Mon Sep 17 00:00:00 2001 From: Diego Mauricio Lagos Date: Mon, 27 Jan 2025 12:19:39 +0100 Subject: [PATCH 2/3] action: added packages write and updated action with github token for maven release --- .github/workflows/flow-release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flow-release.yml b/.github/workflows/flow-release.yml index b2c7cc3..2b0f62c 100644 --- a/.github/workflows/flow-release.yml +++ b/.github/workflows/flow-release.yml @@ -12,8 +12,11 @@ on: - '.**' workflow_dispatch: -jobs: +permissions: + packages: write + contents: read +jobs: checkout: name: 🔖 Checkout Repository runs-on: ubuntu-22.04 @@ -30,7 +33,7 @@ jobs: steps: - name: 🚀 release + docker # https://github.com/pagopa/github-actions-template/releases/tag/v2.0.0 - uses: pagopa/github-actions-template/payments-flow-release@b825ee193430395706a4a7e580b8435bdded0227 + uses: pagopa/github-actions-template/payments-flow-release@fix-maven-package-read with: current_branch: ${{ github.ref_name }} @@ -49,7 +52,7 @@ jobs: azure_devops_pat: ${{ secrets.AZURE_DEVOPS_TOKEN }} azure_template_parameters: | { - "APPS_TOP": "[p4pa-auth]", + "APPS_TOP": "[template]", "POSTMAN_BRANCH": "${{ github.ref_name }}", - "TRIGGER_MESSAGE": "p4pa-auth" + "TRIGGER_MESSAGE": "template" } From a0c9f1bf09c12eb3c1d22be4e79f8535d96e41d2 Mon Sep 17 00:00:00 2001 From: Diego Mauricio Lagos Date: Mon, 27 Jan 2025 12:21:19 +0100 Subject: [PATCH 3/3] action: added packages write and updated action with github token for maven release --- .github/workflows/flow-snapshot-docker.yml | 2 -- force-release | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/flow-snapshot-docker.yml b/.github/workflows/flow-snapshot-docker.yml index 618ac28..f499fd0 100644 --- a/.github/workflows/flow-snapshot-docker.yml +++ b/.github/workflows/flow-snapshot-docker.yml @@ -63,8 +63,6 @@ jobs: uses: pagopa/github-actions-template/payments-flow-docker-snapshot@fix-maven-package-read with: current_branch: ${{ github.ref_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} azure-devops-trigger: name: 🅰️ Azure DevOps Pipeline Trigger diff --git a/force-release b/force-release index efffd3b..3acca38 100644 --- a/force-release +++ b/force-release @@ -1 +1 @@ -1214 +1221