From 4c28db38cba00042fe49fed4b7bfe4023c72de71 Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Wed, 18 Sep 2024 09:00:52 +0200 Subject: [PATCH] Rework push [release] --- .github/workflows/docker-push.yml | 22 +++++++++++++++++++++- Dockerfile | 4 ++-- version-main | 1 + version-ptb | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 version-main create mode 100644 version-ptb diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 0a4243e..7cfaafc 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -10,7 +10,17 @@ env: jobs: build-and-push-image: + strategy: + matrix: + config: + - main: + - repo: xpipe-io/xpipe + - tag: main + - ptb: + - repo: xpipe-io/xpipe-ptb + - tag: ptb runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, '[release]') || contains(github.event.head_commit.message, '[stage]') permissions: contents: read packages: write @@ -19,6 +29,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + + - name: Set variables + run: | + XPIPE_VERSION=$(cat "${{ github.workspace }}/xpipe-webtop/${{ contains(github.event.head_commit.message, '[release]') == true && 'version-main' || 'version-ptb' }}") + echo "XPIPE_VERSION=$XPIPE_VERSION" >> $GITHUB_ENV + XPIPE_REPOSITORY=${{ contains(github.event.head_commit.message, '[release]') == true && 'xpipe-io/xpipe' || 'xpipe-io/xpipe-ptb' }} + echo "XPIPE_REPOSITORY=$XPIPE_REPOSITORY" >> $GITHUB_ENV + - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: @@ -31,7 +49,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} labels: | - org.opencontainers.image.description=XPipe webtop container org.opencontainers.image.vendor=xpipe.io org.opencontainers.image.authors=xpipe.io org.opencontainers.image.documentation=https://github.com/xpipe-io/xpipe-webtop @@ -45,6 +62,9 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + "XPIPE_VERSION=${{ env.XPIPE_VERSION }}" + "XPIPE_REPOSITORY=${{ env.XPIPE_REPOSITORY }}" - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: diff --git a/Dockerfile b/Dockerfile index bc138ed..cfab35d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM ghcr.io/linuxserver/baseimage-kasmvnc:ubuntunoble ARG DEBIAN_FRONTEND="noninteractive" ENV TITLE="XPipe Webtop" -ARG XPIPE_VERSION="11.3" -ARG XPIPE_REPOSITORY="xpipe-io/xpipe" +ARG XPIPE_VERSION +ARG XPIPE_REPOSITORY # prevent Ubuntu's firefox stub from being installed COPY /root/etc/apt/preferences.d/firefox-no-snap /etc/apt/preferences.d/firefox-no-snap diff --git a/version-main b/version-main new file mode 100644 index 0000000..f2f3fcc --- /dev/null +++ b/version-main @@ -0,0 +1 @@ +11.3 \ No newline at end of file diff --git a/version-ptb b/version-ptb new file mode 100644 index 0000000..7f20585 --- /dev/null +++ b/version-ptb @@ -0,0 +1 @@ +11.4-2 \ No newline at end of file