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

Upgrade checkout action version #35

Merged
merged 2 commits into from
Aug 15, 2024
Merged

Conversation

mfitz
Copy link
Contributor

@mfitz mfitz commented Aug 13, 2024

Before fix

A mixture of different versions of the checkout action were in use, with the majority of workflows using the deprecated v3:

√ actions-city-modelling-lab % cd .github/workflow
√ workflows % grep checkout *.yml

aws-upload.yml:    - uses: actions/checkout@v3
conda-build.yml:      - uses: actions/checkout@v3
conda-build.yml:    - uses: actions/checkout@v3
conda-upload.yml:    - uses: actions/checkout@v3
docs-deploy.yml:    - uses: actions/checkout@v4
docs-deploy.yml:    - uses: actions/checkout@v4
pip-build.yml:    - uses: actions/checkout@v3
template-check.yml:      - uses: actions/checkout@v3
validate-reusable-workflows.yml:        uses: actions/checkout@v3

Fix methodology

Global find and replace:

√ workflows % sed -i '.bak' 's/checkout@v3/checkout@v4/g' *

Because I wanted sed to backup the original files in <filename>.bak copies, I created a .gitignore to keep those backup files away from Git.

After fix

All workflows are now using checkout@v4:

√ workflows % grep checkout *.yml

aws-upload.yml:    - uses: actions/checkout@v4
conda-build.yml:      - uses: actions/checkout@v4
conda-build.yml:    - uses: actions/checkout@v4
conda-upload.yml:    - uses: actions/checkout@v4
docs-deploy.yml:    - uses: actions/checkout@v4
docs-deploy.yml:    - uses: actions/checkout@v4
pip-build.yml:    - uses: actions/checkout@v4
template-check.yml:      - uses: actions/checkout@v4
validate-reusable-workflows.yml:        uses: actions/checkout@v4

Copy link
Collaborator

@brynpickering brynpickering left a comment

Choose a reason for hiding this comment

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

Looks good - should check if there is a dependabot equivalent for CI action versions!

@mfitz mfitz merged commit 8d21f5a into main Aug 15, 2024
1 check passed
@mfitz mfitz deleted the upgrade-checkout-action-version branch August 15, 2024 08:41
@mfitz
Copy link
Contributor Author

mfitz commented Aug 15, 2024

Looks good - should check if there is a dependabot equivalent for CI action versions!

Turns out that such a thing exists @brynpickering!

https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

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.

Upgrade the version of the checkout action in use
2 participants