-
-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (40 loc) · 1.1 KB
/
release.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
name: Release
on:
push:
branches:
- main
# TODO: make sure database sql is valid before releasing
jobs:
release:
strategy:
fail-fast: false
matrix:
target:
- database
- graphql
- server
name: Release ${{ matrix.target }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get short commit SHA
id: shortsha
run: echo "shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/bake-action@v4
with:
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
server.args.VITE_APP_VER=${{ steps.shortsha.outputs.shortsha }}
targets: ${{ matrix.target }}
push: true