-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (29 loc) · 1.05 KB
/
subscription.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
35
36
name: Update subscription repository
# Once a week, on monday at 1 AM, it copies packages from stable channel to subscription channel
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 1"
jobs:
update-package:
name: Sync stable channel to subscription one
runs-on: ubuntu-latest
steps:
- name: Sync stable to subscription
env:
DO_SPACE_ACCESS_KEY: ${{ secrets.DO_SPACE_ACCESS_KEY }}
DO_SPACE_SECRET_KEY: ${{ secrets.DO_SPACE_SECRET_KEY }}
run: |
cat <<EOF > rclone.conf
[spaces]
type = s3
provider = DigitalOcean
env_auth = false
access_key_id = $DO_SPACE_ACCESS_KEY
secret_access_key = $DO_SPACE_SECRET_KEY
endpoint = ams3.digitaloceanspaces.com
acl = public-read
EOF
chmod 600 rclone.conf
podman run -ti -v ./rclone.conf:/rclone.conf:z docker.io/rclone/rclone --config /rclone.conf sync \
-v -M --delete-after spaces:nethsecurity/stable spaces:nethsecurity/subscription