Merge branch 'development' of github.com:contentful/experience-builde… #3746
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: Main | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| inputs: | |
| publish-prerelease: | |
| description: 'Publish prerelease version of the selected branch' | |
| required: false | |
| default: false | |
| type: boolean | |
| publish-web-apps-to-prod: | |
| description: 'Publish web apps to prod' | |
| required: false | |
| default: false | |
| type: boolean | |
| # Default permissions - most restrictive | |
| permissions: | |
| contents: read | |
| jobs: | |
| install-build: | |
| permissions: | |
| contents: read # Checkout code | |
| actions: write # Save cache | |
| uses: ./.github/workflows/build.yaml | |
| check: | |
| needs: install-build | |
| permissions: | |
| contents: read # Checkout code | |
| actions: read # Restore cache | |
| uses: ./.github/workflows/check.yaml | |
| vercel: | |
| needs: [install-build, check] | |
| permissions: | |
| contents: write # Checkout with full history | |
| id-token: write # OIDC token for authentication | |
| actions: read # Restore cache | |
| uses: ./.github/workflows/vercel.yaml | |
| with: | |
| publish-web-apps-to-prod: ${{ !!inputs.publish-web-apps-to-prod }} | |
| secrets: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| publish: | |
| needs: [install-build, check] | |
| if: >- | |
| (github.ref_name == 'main' || | |
| github.ref_name == 'development' || | |
| github.ref_name == 'next' || | |
| inputs.publish-prerelease | |
| ) && | |
| !contains(github.event.head_commit.message, 'skip-release') && | |
| github.actor != 'dependabot[bot]' && | |
| github.actor != 'contentful-automation[bot]' | |
| permissions: | |
| contents: write # Create releases and tags | |
| id-token: write # OIDC token for Vault authentication | |
| actions: read # Restore cache | |
| uses: ./.github/workflows/publish.yaml | |
| with: | |
| publish-prelease: ${{ !!inputs.publish-prerelease }} | |
| secrets: | |
| VAULT_URL: ${{ secrets.VAULT_URL }} | |
| upload-artifact-cleanup: | |
| if: ${{ always() }} | |
| needs: [install-build, check, publish, vercel] | |
| permissions: | |
| contents: read # Checkout code | |
| actions: write # Delete and restore caches | |
| uses: ./.github/workflows/cleanup.yaml |