-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (68 loc) · 2.74 KB
/
force-release.yaml
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
68
69
70
71
72
on:
workflow_dispatch:
permissions: write-all
name: Force Release
jobs:
full-release:
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.16.0'
cache: 'npm'
cache-dependency-path: ./frontend/package-lock.json
- name: Setup Github Packages Token
working-directory: ./frontend
run: echo //npm.pkg.github.com/:_authToken=${{ secrets.PKG_KEY }} >> ~/.npmrc
- name: Install Dependencies
working-directory: ./frontend
run: npm ci
- name: Build Frontend
working-directory: ./frontend
run: npm run build
- name: Build Latest Images
run: |
docker build -f ./docker/admin/Dockerfile -t hp-admin:latest .
docker build -f ./docker/backend/Dockerfile -t hp-api:latest .
docker build -f ./docker/site/Dockerfile -t hp-site:latest .
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Upload Tagged Images to Registry
run: |
docker tag hp-admin:latest ghcr.io/evanlab02/hp-admin:${{ github.ref_name }}
docker push ghcr.io/evanlab02/hp-admin:${{ github.ref_name }}
docker tag hp-api:latest ghcr.io/evanlab02/hp-api:${{ github.ref_name }}
docker push ghcr.io/evanlab02/hp-api:${{ github.ref_name }}
docker tag hp-site:latest ghcr.io/evanlab02/hp-site:${{ github.ref_name }}
docker push ghcr.io/evanlab02/hp-site:${{ github.ref_name }}
- name: Upload Latest Images to Registry
run: |
docker tag hp-admin:latest ghcr.io/evanlab02/hp-admin:latest
docker push ghcr.io/evanlab02/hp-admin:latest
docker tag hp-api:latest ghcr.io/evanlab02/hp-api:latest
docker push ghcr.io/evanlab02/hp-api:latest
docker tag hp-site:latest ghcr.io/evanlab02/hp-site:latest
docker push ghcr.io/evanlab02/hp-site:latest
installer-release:
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v4
- name: Create installation directory
run: |
mkdir -p ./HomePortal
cp ./compose.yaml ./HomePortal
mkdir -p ./HomePortal/site
cp ./site/examples/Caddyfile ./HomePortal/site/Caddyfile
cp -r ./scripts ./HomePortal
cp ./.env.template ./HomePortal
- name: Create installer zip
run: |
zip -r HomePortal.zip ./HomePortal
- name: Upload installer zip
run: |
gh release upload ${{ github.ref_name }} HomePortal.zip
env:
GITHUB_TOKEN: ${{ github.TOKEN }}