Set a branch in the action #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: accept-flake-config = true | |
- uses: cachix/cachix-action@v14 | |
with: | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
name: nickel-schemastore | |
- env: | |
GH_TOKEN: ${{ github.token }} | |
name: Ensure that schema files don't need a rebuild | |
run: |- | |
nix develop --command python3 ./extract-schemas.py | |
if ! git diff --exit-code; then | |
git checkout -b update-schemas-from-{{env.GITHUB_RUN_ID}} | |
git add . | |
git config user.name "Schemas update bot" | |
git config user.email "noreply@schemaupdate.invalid" | |
git commit --message="Re-generate the schema files" | |
nix run --inputs-from . nixpkgs\#gh -- pr create \ | |
--title "Re-generate the schema files" \ | |
--body "Automated update from {{ env.GITHUB_RUN_ID }}" | |
fi | |
on: | |
push: {} | |
schedule: | |
- cron: 0 0 * * 0 | |
workflow_dispatch: {} |