From afe98b5eae3eef29781648407ca834c4a407b92f Mon Sep 17 00:00:00 2001 From: s3lph Date: Mon, 13 Nov 2023 23:28:42 +0100 Subject: [PATCH] feat: migrate from woodpecker to forgejo actions --- .forgejo/workflows/build.yml | 13 +++++++++++++ .forgejo/workflows/upload.yml | 26 ++++++++++++++++++++++++++ .woodpecker.yml | 29 ----------------------------- 3 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 .forgejo/workflows/build.yml create mode 100644 .forgejo/workflows/upload.yml delete mode 100644 .woodpecker.yml diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..6156421 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,13 @@ +--- + +on: push + +jobs: + build: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v3 + - run: | + pip install -r requirements.txt + ./build.py + diff --git a/.forgejo/workflows/upload.yml b/.forgejo/workflows/upload.yml new file mode 100644 index 0000000..bcb3740 --- /dev/null +++ b/.forgejo/workflows/upload.yml @@ -0,0 +1,26 @@ +--- + +on: + push: + branches: + - main + +jobs: + upload: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v3 + - run: | + apt-get update + apt-get install --yes --no-install-recommends rsync openssh-client + pip3 install -r requirements.txt + ./build.py + mkdir -p .ssh && chmod 0700 .ssh + cat > .ssh/id_ed25519 < .ssh/known_hosts < "$SSH_PRIVKEY_FILE" - - echo "$SSH_KNOWN_HOSTS" > "$SSH_KNOWN_HOSTS_FILE" - - chmod 0600 "$SSH_PRIVKEY_FILE" - - rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=$SSH_KNOWN_HOSTS_FILE -i $SSH_PRIVKEY_FILE" "out/" "$RSYNC_DEST"