GitHub Action that clones a repo into a working directory, lets you modify it, and then commits the changes back to the repository.
Use Your GitHub repository (just one branch) as a simple database!
GitHub Actions action.yml
has an under-documented feature of post
runs.
This is run at the end of all other steps automatically.
We can use that post step to commit any changes back to the original repo that we checkout.
In your GitHub Actions, add a config like this:
jobs:
self-test-and-generate-stats:
runs-on: ubuntu-latest # Anything should work
steps:
- name: Checkout Working Directory
uses: cinderblock/github-action-working-directory@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: '' # Current
branch: working-dir/${{ github.ref }}
working-directory: working-dir
commit-message: GitHub Actions
commit-name: GitHub Actions
commit-email: actions@github.com
commit-unchanged: ''
# Make whatever changes you like
- run: date >> run.log
working-directory: working-dir
Multiple concurrent working directories are supported.
For an example, look for # Test with self
in main.yml
workflow file.
We use our own action to store historical data for Allure 2.
Includes historical trends because of this action!
Setup everything.
We use npm
.
npm run all
Run the tests ✔️
npm test