Skip to content

Build Smanga Alpha Docker #115

Build Smanga Alpha Docker

Build Smanga Alpha Docker #115

Workflow file for this run

name: Build Smanga Alpha Docker
on:
workflow_dispatch:
push:
paths:
- .github/workflows/docker_alpha.yml
env:
BUILD_BASE: false
jobs:
base:
name: Build Smanga Base Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Up QEMU
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build Base
if: ${{ env.BUILD_BASE == 'true' }}
uses: docker/build-push-action@v4
with:
context: .
file: docker/base.Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=${{ steps.set-version.outputs.version }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga-base:alpha
build:
needs: [base]
name: Build Smanga Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Version
id: set-version
run: |
SMANGA_VERSION=$(jq -r '.version' package.json)
echo "version=${SMANGA_VERSION}" >> $GITHUB_OUTPUT
-
name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
-
name: Build Web
run: |
npm install
npm run build-docker
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=${{ steps.set-version.outputs.version }}
SMANGA_BASE_VERSION=alpha
SMANGA_BASE_NAME=${{ secrets.DOCKER_USERNAME }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga:nosql-alpha
build_mysql:
needs: [build, base]
name: Build Smanga Mysql Docker
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set Version
id: set-version
run: |
SMANGA_VERSION=$(jq -r '.version' package.json)
echo "version=${SMANGA_VERSION}" >> $GITHUB_OUTPUT
-
name: Set Up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set Up Buildx
uses: docker/setup-buildx-action@v2
-
name: Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
file: docker/mysql.Dockerfile
platforms: |
linux/amd64
push: true
build-args: |
SMANGA_VERSION=alpha
SMANGA_BASE_NAME=${{ secrets.DOCKER_USERNAME }}
tags: |
${{ secrets.DOCKER_USERNAME }}/smanga:alpha