forked from Scratchcat1/not-on-my-shift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
31 additions
and
34 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 |
---|---|---|
@@ -1,38 +1,35 @@ | ||
name: CI | ||
|
||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install deps | ||
run: python3 -m pip install -r tools/requirements.txt --no-warn-script-location | ||
on: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
workflow_dispatch: | ||
|
||
- name: Build | ||
run: | | ||
mkdir built | ||
python3 tools/build.py filters/main.yml --hosts built/hosts.txt --abp built/abp.txt --domains built/domains.txt | ||
brotli built/* | ||
permissions: read-all | ||
|
||
- name: Ensure files have contents | ||
run: | | ||
[ $(wc -l < built/hosts.txt) -gt 100 ] | ||
[ $(wc -l < built/abp.txt) -gt 100 ] | ||
[ $(wc -l < built/domains.txt) -gt 100 ] | ||
- name: Publish | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "|1|40RGWMsg0FNOPYd+x4ZLEosg4zQ=|EAyRl4G9+69a9dq0SUQpWimmpNk= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+v6Lr/30gISPJk8ViZ/esm/PYi97Bqxhr5Fn9Yt1kI" >~/.ssh/known_hosts | ||
chmod 600 ~/.ssh/known_hosts | ||
echo "${{ secrets.SSH_KEY }}" >~/.ssh/id_ed25519 | ||
chmod 400 ~/.ssh/id_ed25519 | ||
sftp [email protected] <<'EOF' | ||
lcd built | ||
cd orcapet/notonmyshift | ||
put * | ||
EOF | ||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install deps | ||
run: python3 -m pip install -r tools/requirements.txt --no-warn-script-location | ||
- name: Build | ||
run: | | ||
mkdir built | ||
python3 tools/build.py filters/main.yml --hosts built/hosts.txt --abp built/abp.txt --domains built/domains.txt | ||
brotli built/* | ||
- name: Ensure files have contents | ||
run: | | ||
[ $(wc -l < built/hosts.txt) -gt 100 ] | ||
[ $(wc -l < built/abp.txt) -gt 100 ] | ||
[ $(wc -l < built/domains.txt) -gt 100 ] | ||
- name: Publish | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
git config --global --add safe.directory /__w/not-on-my-shift/not-on-my-shift | ||
chmod +x commit.bash | ||
bash commit.bash |
0
one-click-build.sh → build.bash
100755 → 100644
File renamed without changes.
0
commit.sh → commit.bash
100755 → 100644
File renamed without changes.