-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·45 lines (44 loc) · 1.4 KB
/
build.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
name: Build and push Sakura image
on:
push:
branches:
- 'master'
jobs:
build-push-sakura:
container:
image: ghcr.io/lolibrary/builder
credentials:
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
runs-on: ubuntu-latest
steps:
- name: Checkout build tools
uses: actions/checkout@v2
with:
repository: lolibrary/build
token: ${{ secrets.PAT }}
- name: Checkout Sakura
uses: actions/checkout@v2
with:
path: cache
- name: GHCR login
uses: docker/login-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
registry: ghcr.io
- name: Install PHP dependencies
run: |
composer config http-basic.nova.laravel.com ${{ secrets.NOVA_USERNAME }} ${{ secrets.NOVA_API_KEY }} --no-interaction --working-dir cache
COMPOSER_MEMORY_LIMIT=-1 composer install --no-interaction --working-dir cache
- name: Install JS dependencies
run: npm install --prefix cache
- name: Build App
run: npm run production --prefix cache
- name: Docker Build & Push
run: |
docker build -t $DOCKER_SHA_TAG .
docker push $DOCKER_SHA_TAG
env:
DOCKER_SHA_TAG: "ghcr.io/lolibrary/sakura:${{ github.sha }}"
PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}