-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·47 lines (46 loc) · 1.43 KB
/
build-branch.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
name: Build and push branch image
on:
push:
branches-ignore:
- 'master'
- 'i18n'
- 'dev'
jobs:
build-push-branch:
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@v4
with:
repository: lolibrary/build
token: ${{ secrets.PAT }}
- name: Checkout Sakura
uses: actions/checkout@v4
with:
path: cache
- name: GHCR login
uses: docker/login-action@v3
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 build --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 }}