diff --git a/.github/workflows/build-docker-images.yaml b/.github/workflows/build-docker-images.yaml index b509a92..8e18e13 100644 --- a/.github/workflows/build-docker-images.yaml +++ b/.github/workflows/build-docker-images.yaml @@ -137,3 +137,45 @@ jobs: author_email: mail@example.com cwd: sofi_core_gitops message: Update deployments with tag "${{ needs.prepare_tag.outputs.tag }}" + + commit_to_test: + needs: + - prepare_tag + - build_and_push + environment: test + permissions: + contents: write + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: ssi-dk/sofi_core_gitops + ref: main + path: sofi_core_gitops + token: "${{ secrets.ACTION_PAT }}" + + - name: Update Image Tags + uses: mikefarah/yq@master + with: + cmd: | + # sap-web + yq e '.images[] |= select(.name == "ghcr.io/ssi-dk/sap-web").newTag = "${{ needs.prepare_tag.outputs.tag }}"' -i ./sofi_core_gitops/apps/test/sap-web/kustomization.yaml + + # sap-api + yq e '.images[] |= select(.name == "ghcr.io/ssi-dk/sap-api").newTag = "${{ needs.prepare_tag.outputs.tag }}"' -i ./sofi_core_gitops/apps/test/sap-api/kustomization.yaml + + # bifrost-queue-broker + yq e '.images[] |= select(.name == "ghcr.io/ssi-dk/bifrost-queue-broker").newTag = "${{ needs.prepare_tag.outputs.tag }}"' -i ./sofi_core_gitops/apps/test/bifrost-queue-broker/kustomization.yaml + + # bifrost-listener + yq e '.images[] |= select(.name == "ghcr.io/ssi-dk/bifrost-listener").newTag = "${{ needs.prepare_tag.outputs.tag }}"' -i ./sofi_core_gitops/apps/test/bifrost-listener/kustomization.yaml + + - uses: EndBug/add-and-commit@v9 + with: + author_name: GitOps Bot + author_email: mail@example.com + cwd: sofi_core_gitops + message: Update deployments with tag "${{ needs.prepare_tag.outputs.tag }}"