forked from shabados/database
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.34 KB
/
dev.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
name: dev
on:
push:
branches: [ main ]
jobs:
build-mariadb:
if: "!contains(github.event.head_commit.message, '#release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- name: Docker login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin
- uses: benjlevesque/short-sha@v2.2
id: short-sha
- name: Set build tag
run: echo "DOCKER_IMAGE_TAG=dev-${{ steps.short-sha.outputs.sha }}-$(date +%s)" >> $GITHUB_ENV
- name: Build container
run: docker build -f docker/mariadb/Dockerfile -t ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} .
- name: Publish container
run: |
docker push ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }}
docker tag ghcr.io/gurbaninow/database:${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gurbaninow/database:dev
docker push ghcr.io/gurbaninow/database:dev
build-sqlite:
if: "!contains(github.event.head_commit.message, '#release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- uses: actions/setup-node@v3
- run: npm ci
- name: Build database
run: npm run build-sqlite