forked from MichaIng/DietPi
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.26 KB
/
gogs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: gogs
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
permissions: {}
jobs:
build:
# https://github.com/actions/virtual-environments
runs-on: ubuntu-22.04
steps:
# https://github.com/actions/setup-go/tags
- uses: actions/setup-go@v3
with:
go-version: 'stable'
- name: Build
run: |
apt-get update
apt-get -qq full-upgrade
apt-get -qq install zip 7zip
go install 'gogs.io/gogs@latest'
mkdir gogs
mv go/bin/gogs gogs/
zip -9r gogs_armv6.zip gogs
7zz a -mx=9 gogs_armv6l.7z gogs
- name: Upload
run: |
mkdir -pv .ssh
umask 377
echo '${{ secrets.KNOWN_HOSTS }}' > .ssh/known_hosts
echo '${{ secrets.SSH_KEY }}' > .ssh/id_ed25519
curl -T 'gogs_armv6*' --key .ssh/id_ed25519 'sftp://[email protected]:29248/all/'
curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \
--data '{"files":["https://dietpi.com/downloads/binaries/all/","https://dietpi.com/downloads/binaries/all/gogs_armv6.zip","https://dietpi.com/downloads/binaries/all/gogs_armv6l.7z"]}'