mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 17:03:53 +00:00
03d5389540
* Create docker-ci.yml * docker build * add build app * path changes * delete double workflow * update docker run template * cleanup * resolve wierd path issue * wrong path * again wrong path * rename docker releases * move styles population and change to function call * re-add old build pipeline * rename buld file * feractor init function * refactor: startDb to initAssets * refactor: startDB to initAssets * fix: docker.cjs building whole app * fix: docker environment * update docker paths * update: build command * cleanup * cleanup: commented code --------- Co-authored-by: Fabian Posenau <fabian@fphome.de>
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
name: Docker Image CI Ontime V2
|
|
|
|
on:
|
|
push:
|
|
tags: [ "v2.*.*" ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
publish_docker:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CI: ''
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup env
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v3.6.0
|
|
with:
|
|
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.
|
|
version: 16.16.0
|
|
|
|
- name: Setup pnpm
|
|
# You may pin to the exact commit or the version.
|
|
# uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
|
|
uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
# Version of pnpm to install
|
|
version: 7.26.3
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build project packages
|
|
run: pnpm turbo build:docker
|
|
|
|
- name: Docker Login
|
|
# You may pin to the exact commit or the version.
|
|
# uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
|
uses: docker/login-action@v2.1.0
|
|
with:
|
|
# Username used to log against the Docker registry
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
# Password or personal access token used to log against the Docker registry
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Docker Setup Buildx
|
|
# You may pin to the exact commit or the version.
|
|
# uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c
|
|
uses: docker/setup-buildx-action@v2.5.0
|
|
|
|
- name: Build and push Docker images
|
|
# You may pin to the exact commit or the version.
|
|
# uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
|
uses: docker/build-push-action@v4.0.0
|
|
with:
|
|
# Build's context is the set of files located in the specified PATH or URL
|
|
context: .
|
|
# Path to the Dockerfile
|
|
file: ./Dockerfile
|
|
# List of target platforms for build
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
|
# Push is a shorthand for --output=type=registry
|
|
push: true
|
|
# List of tags
|
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:beta_${{ env.RELEASE_VERSION }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:beta_v2
|
|
|