Skip to content

Commit

Permalink
fix: auto-commit only from syntaxes/
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-semenov committed Apr 16, 2024
1 parent 4df0e32 commit 9fe7e9c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,25 @@ jobs:
run: vagrant --version

- name: Run vagrant up & provision
run: VER=23.11 vagrant up --provision
run: vagrant up --provision
env:
VER: 23.11

- name: Import GPG key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Auto-commit changes
id: auto-commit-action
uses: stefanzweifel/[email protected]
with:
commit_message: Automated Change
commit_message: auto-commit of artifacts
branch: main
commit_options: '--no-verify --signoff'
commit_user_name: Publishing Bot
file_pattern: 'syntaxes/*'
commit_user_name: publishing-bot
commit_user_email: [email protected]

- name: Run if changes have been detected
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -21,3 +21,12 @@ jobs:
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files }} --show-diff-on-failure

- name: Show pre-commit logs
if: failure()
run: |
find ~/.cache/pre-commit/ -type f -iname ".pre-commit-hooks.yaml" -exec cat {} \;
cat ~/.cache/pre-commit/pre-commit.log
- name: Show pre-commit version
run: pre-commit --version
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Vagrant.configure("2") do |config|
cd /vagrant/
echo "statix check &&\
nix flake check --impure &&\
cp -r \$(nix build --impure --no-link --print-out-paths) ./syntaxes/" |\
cp \$(nix build --impure --no-link --print-out-paths)/* ./syntaxes/" |\
nix-shell --run bash
SHELL
end

0 comments on commit 9fe7e9c

Please sign in to comment.