From 7f04bdc8c4ca93a5faabac2546920243defd5726 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 18 Mar 2025 12:07:27 +0100 Subject: [PATCH 1/2] Fix ref for TAG --- .github/workflows/publish-new-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-new-build.yml b/.github/workflows/publish-new-build.yml index f75e722..c64bc54 100644 --- a/.github/workflows/publish-new-build.yml +++ b/.github/workflows/publish-new-build.yml @@ -65,7 +65,9 @@ jobs: git-tag: runs-on: ubuntu-latest - needs: build-and-publish + needs: + - bump-version + - build-and-publish if: | ${{ github.ref_name == 'main' && inputs.version != '' }} && always() && @@ -74,6 +76,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ needs.bump-version.outputs.commit_sha }} - name: Create and push tag run: | From 76fe359b2c3929a7691feeacad1d7c5a760a8081 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 4 Nov 2025 09:14:24 +0100 Subject: [PATCH 2/2] Adjust workflows for stagign deployment --- .github/workflows/manually-trigger-deploy.yml | 18 +++++++++++++++++- .github/workflows/publish-new-build.yml | 14 +++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/manually-trigger-deploy.yml b/.github/workflows/manually-trigger-deploy.yml index ebcbbd5..7191b6c 100644 --- a/.github/workflows/manually-trigger-deploy.yml +++ b/.github/workflows/manually-trigger-deploy.yml @@ -14,13 +14,29 @@ on: type: choice options: - production - default: production + - staging + default: staging permissions: id-token: write contents: read jobs: + trigger-staging-deploy: + runs-on: ubuntu-latest + environment: production-fidl # only one environment available, using for both: staging and production + if: ${{ inputs.version != '' && inputs.environment == 'staging' }} + steps: + - name: Trigger staging deploy + uses: neti-filplus-infra/filplus-deploy-action@main + with: + version: ${{ inputs.version }} + environment: staging + ecr-repository: provider-sample-url-finder + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }} + aws-region: us-east-1 + trigger-production-deploy: runs-on: ubuntu-latest environment: production-fidl diff --git a/.github/workflows/publish-new-build.yml b/.github/workflows/publish-new-build.yml index 6d6c291..753c9f0 100644 --- a/.github/workflows/publish-new-build.yml +++ b/.github/workflows/publish-new-build.yml @@ -13,8 +13,8 @@ on: description: "Enter the version number" required: true default: "latest" - deploy-to-production: - description: "Deploy the new version?" + deploy-to-staging: + description: "Deploy the new version on staging?" required: false type: boolean default: false @@ -95,20 +95,20 @@ jobs: git tag $TAG_NAME git push origin $TAG_NAME - trigger-production-deploy: + trigger-staging-deploy: runs-on: ubuntu-latest needs: - code-check - bump-version - build-and-publish - if: ${{ github.ref_name == 'main' && inputs.version != '' && inputs.deploy-to-production == true }} - environment: production-fidl + if: ${{ inputs.version != '' && inputs.deploy-to-staging == true }} + environment: production-fidl # only one environment available, using for both: staging and production steps: - - name: Trigger production deploy + - name: Trigger staging deploy uses: neti-filplus-infra/filplus-deploy-action@main with: version: ${{ inputs.version }} - environment: production + environment: staging ecr-repository: provider-sample-url-finder aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }}