Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: fix workflow permissions error #58

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Commits on Sep 5, 2024

  1. github: fix workflow permissions error

    currently, the publish job, although not used at all by the release
    workflow, is imported as part of the build.yaml import (for the
    side effect of importing lint, tests and build jobs).
    
    however, this is causing an issue since we switched the default
    permissions to contents/packages read instead of write. as the
    publish job requires the write permission, however, build.yaml
    is imported with the standard permissions, causing the following
    error:
    
    The workflow is not valid. .github/workflows/release.yml (Line: 9, Col: 3): Error calling workflow 'DataDog/otel-profiling-agent/.github/workflows/build.yml@5d1ecca'. The nested job 'publish' is requesting 'contents: write, packages: write', but is only allowed 'contents: read, packages: read'.
    
    To fix this, we create a new workflow, pre-release, that contains
    the publish job, this way common build, lint, tests jobs can be
    imported by both release and pre-release without causing any issue
    Gandem committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    8d506ce View commit details
    Browse the repository at this point in the history