Comments (1)
I had the same problem. Here's my solution:
pre-commit-dependencies-2:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: pre-commit autoupdate
- run: git diff > changes.patch
- uses: actions/[email protected]
with:
name: patch2
path: changes.patch
github-actions-dependencies-3:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Run GitHub Actions Version Updater
continue-on-error: true
uses: saadmk11/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
skip_pull_request: true
- run: git diff > changes.patch
- uses: actions/[email protected]
with:
name: patch3
path: changes.patch
commit-push:
needs:
- pre-commit-dependencies-2
- github-actions-dependencies-3
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: |
for i in 2 3; do
git apply --allow-empty "patch${i}/changes.patch"
rm -rf "patch${i}"
done
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/github-actions
title: "chore: update github actions to latest version"
commit-message: "chore: update github action"
body: Update versions of github actions to latest version.
cleanup-artifacts:
needs: commit-push
runs-on: ubuntu-latest
steps:
- name: Delete all artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
patch*
I had to remove some stuff from my actual workflow, but hopefully I didn't fuck it up.
In essence, each job takes care of one type of update. In this case a job for github-actions-version-updater
and I've also added the job for pre-commit
, because I also have it. Each creates a patch that is stored as an artifact.
commit-push
gets all of those artifacts, applies them and creates a PR with them.
Finally, cleanup-artifacts
removes the artifacts, because it's effectively trash at that point.
Happy to accept improvements.
from github-actions-version-updater.
Related Issues (20)
- error: pathspec 'refs/pull/5/merge' did not match any file(s) known to git
- Feature Request: be able to scan actions defined within a composite actions HOT 2
- "fatal: not in a git directory" after several successful runs HOT 12
- Configuration class has mutable default fields
- dependabot supports github actions HOT 1
- Document fine grained access token permissions HOT 2
- Do not update "azure/login" to last version HOT 2
- Add workaround for weird CodeQL releasing schema HOT 3
- Include release tag in comment when using `release-commit-sha`
- Version update of gh-actions incorrectly placed HOT 2
- Failed while checking for updates
- Self hosted : Error: fatal not in a git directory HOT 2
- Feature request: return the number of the PR created as an output
- Does not run when scheduled? HOT 2
- Action seems to fail when unable to update previously removed workflows HOT 4
- Appending minor/patch when already added HOT 1
- Not updating to new versions
- Not creating PRs any more HOT 1
- Delete previous pull request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-actions-version-updater.