diff --git a/.github/workflows/development-build.yml b/.github/workflows/development-build.yml index 20f87211..5670ad92 100644 --- a/.github/workflows/development-build.yml +++ b/.github/workflows/development-build.yml @@ -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" diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index e443b150..027b5c4e 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -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'}" \ No newline at end of file + "BUILD_CHANNEL=${{github.ref_name}}" + "BUILD_COMMIT_HASH=${{github.sha}} + "BUILD_NAME=${{github.event.inputs.codeName}}" + "BUILD_VERSION=${{github.event.inputs.versionName}}" \ No newline at end of file