fix: nix flake build freezes in github action, so try magic nix cache… #16
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
--- | |
name: Build Artifacts | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: [ "*.md" ] | |
pull_request: | |
branches: [ main ] | |
paths-ignore: [ "*.md" ] | |
jobs: | |
Compile-All: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Vagrant boxes | |
uses: actions/[email protected] | |
with: | |
path: ~/.vagrant.d/boxes | |
key: $${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }} | |
restore-keys: | | |
${{ runner.os }}-vagrant- | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Show Vagrant version | |
run: vagrant --version | |
- name: Run vagrant up & provision | |
run: vagrant up --provision | |
env: | |
VER: 23.11 | |
- name: Get Coverage Badge SVG | |
run: make -B $(pwd)/images/coverage-badge.svg | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/[email protected] | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: GPG user | |
run: | | |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}" | |
echo "username: ${{ steps.import-gpg.outputs.name }}" | |
echo "email: ${{ steps.import-gpg.outputs.email }}" | |
- name: Auto-commit changes | |
id: auto-commit-action | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: auto-commit of artifacts | |
branch: main | |
commit_options: '--no-verify --signoff -S' | |
file_pattern: 'syntaxes/* images/*' | |
commit_user_name: "${{ steps.import-gpg.outputs.name }}" | |
commit_user_email: "${{ steps.import-gpg.outputs.email }}" | |
- name: Run if changes have been detected | |
if: steps.auto-commit-action.outputs.changes_detected == 'true' | |
run: echo "New TextMate grammar was published" |