58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Example
|
|
|
|
on: [push]
|
|
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
|
|
jobs:
|
|
Example:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: node --version
|
|
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v23
|
|
with:
|
|
github_access_token: ${{ secrets.__GITHUB_TOKEN }}
|
|
extra_nix_config: |
|
|
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU=
|
|
substituters = https://cache.nixos.org/ http://s0.koi-bebop.ts.net:5000
|
|
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get ENV var names
|
|
run: printenv | cut -d'=' -f1
|
|
|
|
- name: List files in the repository
|
|
run: |
|
|
ls ${{ gitea.workspace }}
|
|
|
|
# - name: Install dependencies
|
|
# run: |
|
|
# nix profile install nixpkgs#cowsay
|
|
# nix profile install nixpkgs#curl
|
|
|
|
# - run: cowsay testing
|
|
|
|
# - run: curl -I s0.koi-bebop.ts.net
|
|
|
|
- name: Test format
|
|
run: |
|
|
echo "${{ secrets.TEST_SECRET }}" > ./.test_file
|
|
md5sum ./.test_file
|
|
cat ./.test_file
|
|
|
|
- name: Setup SSH Key
|
|
run: |
|
|
echo "${{ secrets.BINARY_CACHE_PUSH_SSH_KEY }}" > ./.id_ed25519
|
|
echo >> ./.id_ed25519
|
|
chmod 600 ./.id_ed25519
|
|
eval $(ssh-agent -a $SSH_AUTH_SOCK)
|
|
md5sum ./.id_ed25519
|
|
ssh-add ./.id_ed25519
|
|
|
|
- name: Copy all built derivations to remote cache
|
|
run: nix copy --to ssh://cache-push@s0.koi-bebop.ts.net /nix/store/* |