Skip to content

Conversation

@chizhg
Copy link
Member

@chizhg chizhg commented Mar 22, 2023

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

@chizhg chizhg force-pushed the ci-update-workflow branch from e91a806 to 4c7ac81 Compare March 22, 2023 04:04
@jihuin jihuin requested a review from anniefu March 22, 2023 20:52
@chizhg chizhg force-pushed the ci-update-workflow branch from 4c7ac81 to efe7dcf Compare March 22, 2023 23:55
@chizhg chizhg force-pushed the ci-update-workflow branch from efe7dcf to dc143fa Compare March 22, 2023 23:55
@anniefu anniefu requested a review from a team March 22, 2023 23:59
on:
schedule:
# Run every hour.
- cron: '0 * * * *'

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 * * * *'

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

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 }}

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.

2 participants