-
-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (54 loc) · 1.8 KB
/
update.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
on:
workflow_dispatch:
schedule:
- cron: '32 4 1-31/3 * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
#- name: Get docker-slim
# run: |
# SLIM_VERSION=1.40.11
# curl -L -o ds.tar.gz https://downloads.dockerslim.com/releases/$SLIM_VERSION/dist_linux.tar.gz
# tar -xvzf ds.tar.gz
# mv dist_linux/* /usr/local/bin/
# rm -rfv ds.tar.gz dist_linux/
- name: Setup
run: |
npm i
- name: Build
env:
BUILD_ENV: production
run: |
npm run build
npx astro build
- name: Publish Site
uses: cloudflare/[email protected]
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
command: pages deploy --project-name=gmodwiki ./dist
- name: Build starter image
run: |
#docker build --tag gmodwiki_fat:latest .
docker build --tag ghcr.io/cfc-servers/gmodwiki:latest .
#- name: Make slim image
# run: |
# /usr/local/bin/docker-slim build \
# --target gmodwiki_fat:latest \
# --preserve-path /app/dist \
# --remove-file-artifacts \
# --continue-after 10 \
# --show-clogs --show-blogs \
# --tag ghcr.io/cfc-servers/gmodwiki:latest
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Tag and push image
run: |
docker push ghcr.io/cfc-servers/gmodwiki --all-tags