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

ci: add GitHub packages to arc release #1525

Merged
merged 2 commits into from
Jun 15, 2022
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/publish-arc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types:
- published

# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
permissions:
contents: write
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
contents: write
contents: read

Perhaps read might be enough as our canary pipeline seems to be working fine with read? (I wonder if we need write for cache writing but apparently not?

packages: write

jobs:
release-controller:
name: Release
Expand Down Expand Up @@ -58,6 +63,8 @@ jobs:
${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:latest
${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }}
${{ env.DOCKERHUB_USERNAME }}/actions-runner-controller:${{ env.VERSION }}-${{ steps.vars.outputs.sha_short }}
ghcr.io/actions-runner-controller/actions-runner-controller:latest
ghcr.io/actions-runner-controller/actions-runner-controller:${{ env.VERSION }}
ghcr.io/actions-runner-controller/actions-runner-controller:${{ env.VERSION }}-${{ steps.vars.outputs.sha_short }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we might also need the permission for package writing at least, as similar as we do for the canary builds (#1524):

https://github.com/actions-runner-controller/actions-runner-controller/blob/2733c36d0ed30a8761ae8b42636975efaee1ae2c/.github/workflows/publish-canary.yaml#L23-L25

Copy link
Collaborator Author

@toast-gear toast-gear Jun 14, 2022

Choose a reason for hiding this comment

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

we don't have any exlicit permissions set at the moment so the token will be write all. I'll do a little test to figure out which we need and add them to his PR as we do more than the canary workflow so may need other permissions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added what I think we need based on the API routes in https://docs.github.com/en/rest/overview/permissions-required-for-github-apps

cache-from: type=gha
cache-to: type=gha,mode=max