feat: Added secrets inherit when calling to integration test execution #37
This file contains hidden or 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
| # ===================================================== | |
| # CD Pipeline: Staging Environment | |
| # ===================================================== | |
| # Description: | |
| # This workflow deploys the latest register-ticket-api image | |
| # to the staging environment whenever a PR is merged into main | |
| # or when triggered manually via workflow_dispatch. | |
| # | |
| # Jobs: | |
| # - deploy-to-stg: Deploys the application using the reusable cd-base workflow | |
| # - promote-to-stg-passed: Tags the image as stg-passed after successful deployment | |
| # ===================================================== | |
| name: CD pipeline for staging environment | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deploy-to-stg: | |
| uses: ./.github/workflows/cd-base.yml | |
| secrets: inherit # pragma: allowlist secret | |
| with: | |
| deployment_env: stg | |
| image_uri: ghcr.io/${{ github.repository_owner }}/register-ticket-api:latest | |
| #promote-to-stg-passed: | |
| #needs: deploy-to-stg | |
| #runs-on: ubunt-latest | |
| #permissions: | |
| #packages: write | |
| #steps: | |
| #- name: Log in Github container registry | |
| #uses: docker/login-action@v3 | |
| #with: | |
| #registry: ghcr.io | |
| #username: ${{ github.actor }} | |
| #password: ${{ secrets.GITHUB_TOKEN }} | |
| #- name: Tag as stg-passed | |
| #run: | | |
| #docker pull ghcr.io/${{ github.repository_owner }}/register-ticket-api:${{ github.sha }} | |
| #docker tag ghcr.io/${{ github.repository_owner }}/register-ticket-api:${{ github.sha }} \ | |
| #ghcr.io/${{ github.repository_owner }}/register-ticket-api:stg-passed | |
| #docker push ghcr.io/${{ github.repository_owner }}/register-ticket-api:stg-passed |