Skip to content

Commit

Permalink
Add github action to update the screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed May 6, 2024
1 parent 5a5ea2f commit cc2283f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/update-screenshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
workflow_dispatch:
push:

jobs:
update_screeshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.GH_SSH_PRIVATE_KEY }}
known_hosts: $GH_PUB_KEY

- name: Get screenshot
run: |
nix build .\#screenshot-system.passthru.tests.qtile \
--print-build-logs -v \
--extra-experimental-features 'nix-command flakes'
- name: Push in gist
run: |
git clone [email protected]:9e1a986f1da9a1452e94103979c79aa4.git gist
cp result/terminal.png gist/screenshot.png
cd gist
git add -m "Update screenshot"
git push origin main

0 comments on commit cc2283f

Please sign in to comment.