-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 1.52 KB
/
release-stable.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
37
38
39
name: Release stable packages
on:
workflow_call:
workflow_dispatch:
jobs:
sync:
name: Moving dev packages to stable
runs-on: ubuntu-latest
env:
RCLONE_CONFIG_SPACES_TYPE: s3
RCLONE_CONFIG_SPACES_PROVIDER: DigitalOcean
RCLONE_CONFIG_SPACES_ENV_AUTH: false
RCLONE_CONFIG_SPACES_ACCESS_KEY_ID: ${{ secrets.DO_SPACE_ACCESS_KEY }}
RCLONE_CONFIG_SPACES_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACE_SECRET_KEY }}
RCLONE_CONFIG_SPACES_ENDPOINT: ams3.digitaloceanspaces.com
RCLONE_CONFIG_SPACES_ACL: public-read
steps:
- uses: actions/checkout@v4
- name: Fetch tag annotations
run: |
# Fetch tag manually because fetch-tags option for checkout@v4 does not work
git fetch --force --tags --depth 500
echo "MAJOR_VERSION=$(git describe | cut -d'-' -f1)" >> "$GITHUB_ENV"
- name: Check for MAJOR_VERSION
run: |
# This check is here because setting the $GITHUB_ENV variable is not immediate propagated to the next line
if [ -z "$MAJOR_VERSION" ]; then
echo "No MAJOR_VERSION found"
exit 1
fi
- name: Install rclone
run: |
TMP_FILE=$(mktemp)
wget https://downloads.rclone.org/v1.66.0/rclone-v1.66.0-linux-amd64.deb -O "$TMP_FILE"
sudo dpkg -i "$TMP_FILE"
- name: Copy packages
run: rclone sync -M --no-update-modtime -v --exclude "/targets/**" "spaces:nethsecurity/dev/$MAJOR_VERSION/" "spaces:nethsecurity/stable/$MAJOR_VERSION/"