Some checks failed
Build and Push Docker Images / build (push) Failing after 1m17s
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: Build and Push Docker Images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
|
|
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to local registry
|
|
if: ${{ secrets.REGISTRY_USER != '' }}
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login crylia -u ${{ secrets.REGISTRY_USER }} --password-stdin || true
|
|
|
|
- name: Build and Push Client
|
|
run: |
|
|
echo "🚀 Building Client..."
|
|
docker buildx build --load -t crylia/japanese-srs-trainer-wanikani-client:latest -f client/Dockerfile client
|
|
docker tag crylia/japanese-srs-trainer-wanikani-client:latest crylia/japanese-srs-trainer-wanikani-client:latest
|
|
docker push crylia/japanese-srs-trainer-wanikani-client:latest
|
|
|
|
- name: Build and Push Server
|
|
run: |
|
|
echo "🚀 Building Server..."
|
|
docker buildx build \
|
|
--build-arg ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET} \
|
|
--build-arg REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET} \
|
|
--load -t crylia/japanese-srs-trainer-wanikani-server:latest -f server/Dockerfile server
|
|
docker tag crylia/japanese-srs-trainer-wanikani-server:latest crylia/japanese-srs-trainer-wanikani-server:latest
|
|
docker push crylia/japanese-srs-trainer-wanikani-server:latest
|