-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action to update the screenshot
- Loading branch information
1 parent
5a5ea2f
commit 3a6fdb3
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 | ||
|
||
- 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: | | ||
eval $(ssh-agent -s) | ||
ssh-add - ${{ secrets.GH_SSH_PRIVATE_KEY }} | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "ImJohnTitor" | ||
git clone [email protected]:9e1a986f1da9a1452e94103979c79aa4.git gist | ||
cp result/terminal.png gist/screenshot.png | ||
cd gist | ||
git add . | ||
git commit -m "Update screenshot" | ||
git push origin main |