Skip to content

fix(ci): release github action needs correct github token permissions #60

fix(ci): release github action needs correct github token permissions

fix(ci): release github action needs correct github token permissions #60

Workflow file for this run

name: CI
permissions:
contents: read
on:
push:
branches: ['*']
jobs:
build:

Check failure on line 10 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml (Line: 10, Col: 3): Error calling workflow 'contentful/contentful.js/.github/workflows/build.yaml@dc1287565ce31fcad2fa250ba98412ac03c17d62'. The workflow is requesting 'actions: read, contents: write', but is only allowed 'actions: none, contents: read'.
permissions:
contents: read
id-token: write
uses: ./.github/workflows/build.yaml
secrets:
VAULT_URL: ${{ secrets.VAULT_URL }}
check:
needs: build
uses: ./.github/workflows/check.yaml
release:
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next')
needs: [build, check]
permissions:
contents: write
id-token: write
actions: read
uses: ./.github/workflows/release.yaml
secrets:
VAULT_URL: ${{ secrets.VAULT_URL }}
notify-failure:
if: |
always() &&
(needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure') &&
(github.event_name == 'push' && github.ref == 'refs/heads/master')
needs: [build, check, release]
permissions:
contents: read
issues: write
uses: ./.github/workflows/failure-notification.yaml
with:
workflow_name: "Main CI Pipeline"
job_name: ${{ needs.build.result == 'failure' && 'build' || needs.check.result == 'failure' && 'check' || needs.release.result == 'failure' && 'release' || 'unknown' }}
failure_reason: "One or more jobs in the main CI pipeline failed. Check the workflow run for detailed error information."