(BSR)[API] test: test push invoices #4431
Workflow file for this run
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
| name: "1 [on_pull_request] Delete PR deployment" | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| jobs: | |
| # Delete pro preview deployment | |
| delete-pro-firebase-preview-deployment: | |
| name: "Delete pro preview deployment" | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: "Authentification to Google" | |
| uses: "google-github-actions/auth@v3" | |
| with: | |
| workload_identity_provider: ${{ secrets.GCP_EHP_WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.GCP_EHP_SERVICE_ACCOUNT }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: "pro/package.json" | |
| - name: "Setup firebase tools" | |
| run: npm install -g firebase-tools | |
| - name: "Get secrets" | |
| id: "secrets" | |
| uses: "google-github-actions/get-secretmanager-secrets@v3" | |
| with: | |
| secrets: |- | |
| FIREBASE_SERVICE_ACCOUNT_TESTING:passculture-metier-ehp/pc_pro_testing_firebase_json | |
| - name: "Authentification to Google" | |
| uses: "google-github-actions/auth@v3" | |
| with: | |
| credentials_json: ${{ steps.secrets.outputs.FIREBASE_SERVICE_ACCOUNT_TESTING }} | |
| - name: "Get pro channel name" | |
| id: pro-channel-name | |
| run: | | |
| shortname=$(echo "${{ github.head_ref }}" | cut -c1-20) | |
| echo "channel-name=pr${{ github.event.pull_request.number }}-$shortname" >> $GITHUB_OUTPUT | |
| - name: "Test if channel exists" | |
| id: test-channel-existence | |
| working-directory: pro | |
| run: | | |
| channel="${{ steps.pro-channel-name.outputs.channel-name }}" | |
| firebase projects:list | |
| firebase use testing | |
| if firebase hosting:channel:list | grep "$channel"; then | |
| echo "should_delete=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "should_delete=false" >> $GITHUB_OUTPUT | |
| fi | |
| # Delete pro firebase deployment | |
| - uses: w9jds/[email protected] | |
| if: steps.test-channel-existence.outputs.should_delete == 'true' | |
| with: | |
| args: hosting:channel:delete ${{ steps.pro-channel-name.outputs.channel-name }} --force | |
| env: | |
| GCP_SA_KEY: ${{ steps.secrets.outputs.FIREBASE_SERVICE_ACCOUNT_TESTING }} | |
| PROJECT_ID: pc-pro-testing | |
| PROJECT_PATH: ./pro |