mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
workflow build task moved to external script
This commit is contained in:
4
.github/actions/build.sh
vendored
Normal file
4
.github/actions/build.sh
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
if [[ $GIT_BRANCH -eq 'develop' ]]; then VERSION=dev-$VERSION; fi
|
||||
docker buildx build --push\
|
||||
--tag zurdi15/romm:latest --tag zurdi15/romm:${VERSION}\
|
||||
--platform linux/arm64,linux/amd64 . --file ./docker/Dockerfile
|
||||
17
.github/workflows/image.yml
vendored
17
.github/workflows/image.yml
vendored
@@ -3,14 +3,6 @@ name: build romm image
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
env:
|
||||
description: 'environment'
|
||||
required: true
|
||||
default: 'dev'
|
||||
type: choice
|
||||
options:
|
||||
- dev
|
||||
- pro
|
||||
version:
|
||||
description: 'romm version'
|
||||
required: true
|
||||
@@ -22,6 +14,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set environment variables
|
||||
run: echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v1
|
||||
@@ -31,11 +25,6 @@ jobs:
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: build the image
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ $ENV -eq 'dev' ]]; then VERSION=$ENV-$VERSION; fi
|
||||
docker buildx build --push\
|
||||
--tag zurdi15/romm:latest --tag zurdi15/romm:${VERSION}\
|
||||
--platform linux/arm64,linux/amd64 . --file ./docker/Dockerfile
|
||||
run: ./.github/scripts/build.sh
|
||||
env:
|
||||
ENV: ${{ inputs.env }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
@@ -24,10 +24,10 @@ RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
||||
COPY ./backend/src ./
|
||||
|
||||
# setup init script and config files
|
||||
COPY ./docker/init_back /init_back
|
||||
COPY ./docker/init_front /init_front
|
||||
COPY ./docker/init /init
|
||||
COPY ./nginx/default.conf /etc/nginx/nginx.conf
|
||||
COPY ./docker/init_scripts/init_back /init_back
|
||||
COPY ./docker/init_scripts/init_front /init_front
|
||||
COPY ./docker/init_scripts/init /init
|
||||
COPY ./docker/nginx/default.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user