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

Add workflow file for publishing releases to immutable action package #485

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

Jcambass
Copy link
Contributor

This workflow file publishes new action releases to the immutable action package of the same name as this repo.

This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.

This workflow file publishes new action releases to the immutable action package of the same name as this repo.

This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.
@Jcambass Jcambass requested a review from a team as a code owner September 13, 2024 11:36
@Jcambass Jcambass self-assigned this Sep 13, 2024
@Jcambass Jcambass temporarily deployed to debug-integration-test September 13, 2024 11:36 — with GitHub Actions Inactive
Copy link

Hello from actions/github-script! (4c33e81)

Comment on lines +20 to +22
uses: actions/publish-immutable-action@0.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

We could update this action to default ot using the GITHUB_TOKEN

github-script/action.yml

Lines 11 to 14 in 35b1cdd

github-token:
description: The GitHub token used to create an authenticated client
default: ${{ github.token }}
required: false


on:
release:
types: [created]
Copy link
Member

Choose a reason for hiding this comment

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

Should we use release published instead of created?

https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=published#release

Users may create a draft release and not want others to depend on it yet.

runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
Copy link
Member

Choose a reason for hiding this comment

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

Why is an OIDC token needed?

Copy link

@conorsloan conorsloan Sep 13, 2024

Choose a reason for hiding this comment

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

It's required for generating the attestation - it uses the id-token to prove the identity and request a Sigstore signing cert. See also: https://github.com/actions/attest-build-provenance?tab=readme-ov-file#usage

The id-token permission gives the action the ability to mint the OIDC token necessary to request a Sigstore signing certificate. The attestations permission is necessary to persist the attestation.

(we don't persist the attestation with GitHub's API so we don't need that second one)

Copy link
Member

@joshmgross joshmgross left a comment

Choose a reason for hiding this comment

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

Comments are not blocking

@Jcambass Jcambass merged commit 58d7008 into main Sep 13, 2024
14 checks passed
@Jcambass Jcambass deleted the Jcambass-patch-1 branch September 13, 2024 14:53
@Jcambass
Copy link
Contributor Author

Will follow-up on the review comments in a separate PR across multiple repositories.

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.

3 participants