Merge pull request #1384 from contentful/chore/update_react_and_next #3735
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 | |
| jobs: | |
| install-build: | |
| uses: ./.github/workflows/build.yaml | |
| check: | |
| needs: install-build | |
| uses: ./.github/workflows/check.yaml | |
| vercel: | |
| needs: [install-build, check] | |
| 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 | |
| id-token: write | |
| 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: | |
| actions: write | |
| uses: ./.github/workflows/cleanup.yaml |