refactor versioning ci/cd

This commit is contained in:
zurdi zurdo
2023-04-04 17:03:10 +02:00
parent 8375ae3f22
commit 83188970cd
3 changed files with 9 additions and 10 deletions

View File

@@ -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

View File

@@ -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 }}

View File

@@ -1 +1 @@
VITE_ROMM_VERSION='1.6.2'
VITE_ROMM_VERSION=1.6.3