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

Create a GitHub Actions to automatically update the go version matrix #177

Closed
wants to merge 1 commit into from

Conversation

chizhg
Copy link
Member

@chizhg chizhg commented Mar 22, 2023

This one has the same questions and concerns as golang/appengine#307 (comment)

@anniefu anniefu requested a review from a team March 22, 2023 23:59
on:
schedule:
# Run every hour.
- cron: '0 * * * *'
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets run this less frequently, like every month. Not sure how frequently go versions are made available.

schedule:
# Run every hour.
- cron: '0 * * * *'

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets define the default token permission for the jobs in this action

# Declare default permissions as read only.
permissions: read-all

like in https://github.com/GoogleCloudPlatform/functions-framework-go/blob/master/.github/workflows/scorecard.yml

sed -i "0,/^ go: \[.*/s// go: \[$versions_str\]/" .github/workflows/lint.yml

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to avoid using PATs.
Github provides a special token {{secrets.GITHUB_TOKEN}} which expires after a job runs.
More info in: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
Lets verify if it is a good fit here

@chizhg
Copy link
Member Author

chizhg commented Mar 25, 2023

I'm going to use a central repo to setup the GitHub Actions to update all the repos. Closing this pull request.

@chizhg chizhg closed this Mar 25, 2023
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.

None yet

2 participants