Skip to content

Merge pull request #59 from lolibrary/i18n #339

Merge pull request #59 from lolibrary/i18n

Merge pull request #59 from lolibrary/i18n #339

Workflow file for this run

name: Build and push Sakura image
on:
push:
branches:
- 'master'
jobs:
build-push-sakura:
container:
image: ghcr.io/lolibrary/builder@sha256:80ca803642b16c17df149f402b4ea5d440eaef0fa19d54c9431dc4b9acfc6cb5
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 }}
ref: cea7b09494c6541c8bdfc7d919e1d58428061117
- name: Checkout Sakura
uses: actions/checkout@v4
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 }}