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

Set explicit Docker permissions #997

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set explicit Docker permissions
  • Loading branch information
charliermarsh committed Jan 19, 2024
commit 74d1c7015c70eae1f7f498745dc0bd010d57ab83
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ jobs:
with:
plan: ${{ needs.plan.outputs.val }}
secrets: inherit
permissions:
packages: write
contents: read

# Build and package all the platform-agnostic(ish) things
build-global-artifacts:
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,5 @@ build-local-artifacts = false
local-artifacts-jobs = ["./build-binaries", "./build-docker"]
# Publish jobs to run in CI
publish-jobs = ["./publish-pypi"]
# For: `permissions: packages: write`.
allow-dirty = ["ci"]
Comment on lines +170 to +171
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they not support this? Do we lose all the safety guarantees of release won't run if the generated workflow is modified?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, yes. Please bear with me, there was a lot of discussion about this in the Axo Discord, I am trying to understand GitHub's permission model. We should not be publishing from a build step (we should be publishing from a publish step), but GitHub doesn't seem to allow us to build a multi-platform image and publish it in a separate step. I spent time trying to figure it out earlier this week.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(To be clear, I'm testing off this branch, so I'm hoping I won't have to merge this. If I do, it will be temporary as I'll ask Axo team for help.)