Updated workflows

This commit is contained in:
Marcel Baumgartner
2024-06-30 02:16:12 +02:00
parent a895372e13
commit 2eac1b3c78
2 changed files with 18 additions and 10 deletions

View File

@@ -11,6 +11,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
@@ -26,7 +29,7 @@ jobs:
tags: moonlightpanel/moonlight:dev
platforms: linux/amd64,linux/arm64
build-args: |
"BUILD_CHANNEL=${GITHUB_REF#refs/heads/}"
"BUILD_COMMIT_HASH=${git rev-parse --short '$GITHUB_SHA'}"
"BUILD_NAME=devbuild ${date}"
"BUILD_VERSION=${git rev-parse --short '$GITHUB_SHA'}"
"BUILD_CHANNEL=${{github.ref_name}}"
"BUILD_COMMIT_HASH=${{github.sha}}
"BUILD_NAME=devbuild ${{steps.date.outputs.date}}"
"BUILD_VERSION=unknown"

View File

@@ -2,8 +2,13 @@ name: Release Build
on:
workflow_dispatch:
release:
types: [ published ]
inputs:
codeName:
description: 'Code Name'
required: true
versionName:
description: 'Version Name'
required: true
jobs:
build:
@@ -24,7 +29,7 @@ jobs:
tags: moonlightpanel/moonlight:latest
platforms: linux/amd64,linux/arm64
build-args: |
"BUILD_CHANNEL=${GITHUB_REF#refs/heads/}"
"BUILD_COMMIT_HASH=${git rev-parse --short '$GITHUB_SHA'}"
"BUILD_NAME=${{ github.event.release.name }}"
"BUILD_VERSION=${git rev-parse --short '$GITHUB_SHA'}"
"BUILD_CHANNEL=${{github.ref_name}}"
"BUILD_COMMIT_HASH=${{github.sha}}
"BUILD_NAME=${{github.event.inputs.codeName}}"
"BUILD_VERSION=${{github.event.inputs.versionName}}"