mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 02:22:44 +01:00
refactor versioning ci/cd
This commit is contained in:
3
.github/actions/build.sh
vendored
3
.github/actions/build.sh
vendored
@@ -1,4 +1,7 @@
|
||||
VERSION=$(cat ./frontend/.env | grep VITE_ROMM_VERSION | cut -d "=" -f2)
|
||||
|
||||
if [[ $GIT_BRANCH != 'master' ]]; then
|
||||
VERSION=dev-$VERSION
|
||||
docker buildx build --push\
|
||||
--tag zurdi15/romm:dev-latest --tag zurdi15/romm:dev-${VERSION}\
|
||||
--platform linux/arm64 . --file ./docker/Dockerfile
|
||||
|
||||
14
.github/workflows/image.yml
vendored
14
.github/workflows/image.yml
vendored
@@ -1,12 +1,6 @@
|
||||
name: build romm image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'romm version'
|
||||
required: true
|
||||
type: string
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -14,17 +8,19 @@ 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
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Login to docker hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build the image
|
||||
shell: bash
|
||||
run: ./.github/actions/build.sh
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
@@ -1 +1 @@
|
||||
VITE_ROMM_VERSION='1.6.2'
|
||||
VITE_ROMM_VERSION=1.6.3
|
||||
Reference in New Issue
Block a user