Skip to content

Conversation

Copy link

Copilot AI commented Oct 31, 2025

The Docker build workflow fails with "Resource not accessible by integration" when attaching SBOMs to releases because the build job has contents: read permission.

Changes

  • Changed build job's permissions.contents from read to write in .github/workflows/docker-build.yml
build:
  runs-on: ubuntu-latest
  permissions:
-   contents: read
+   contents: write
    packages: write
    id-token: write

This allows the workflow to attach SBOM artifacts to GitHub releases when tags are pushed.

Original prompt

Update the workflow file .github/workflows/docker-build.yml in repository bakerboy448/RedditModLog to fix the failing job that errors with 'Resource not accessible by integration' when attaching SBOMs to a release. The build job currently has permissions.contents: read which prevents the workflow from attaching files to releases. Change the build job's permissions.contents from 'read' to 'write' and make no other changes. Create a new branch named fix/sbom-permissions, commit the change with message 'ci: grant contents write permission so SBOMs can be attached to releases', and open a pull request against the main branch with the given title. Ensure the PR only modifies .github/workflows/docker-build.yml and explain in the PR description why the change is needed and how to verify it fixes the issue.

This pull request was created as a result of the following prompt from Copilot chat.

Update the workflow file .github/workflows/docker-build.yml in repository bakerboy448/RedditModLog to fix the failing job that errors with 'Resource not accessible by integration' when attaching SBOMs to a release. The build job currently has permissions.contents: read which prevents the workflow from attaching files to releases. Change the build job's permissions.contents from 'read' to 'write' and make no other changes. Create a new branch named fix/sbom-permissions, commit the change with message 'ci: grant contents write permission so SBOMs can be attached to releases', and open a pull request against the main branch with the given title. Ensure the PR only modifies .github/workflows/docker-build.yml and explain in the PR description why the change is needed and how to verify it fixes the issue.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: bakerboy448 <55419169+bakerboy448@users.noreply.github.com>
Copilot AI changed the title [WIP] Update permissions to attach SBOMs in releases ci: grant contents write permission for SBOM release attachments Oct 31, 2025
Copilot AI requested a review from bakerboy448 October 31, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants