From 8c2d933530e9dea9eb1dd27ec29b580ab766832c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Sat, 27 Sep 2025 00:35:34 +0200 Subject: [PATCH] Release pipeline --- .gitea/workflows/release.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..4fd38c9 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,37 @@ +name: Build a dev image + +on: + release: + types: [published] + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true + default: 'latest' + type: string + +jobs: + build: + runs-on: [dev, amd64] + env: + IMAGE: harbor.rosti.cz/rosti-public/mgm + steps: + - uses: actions/checkout@v4 + + # Figure out the tag + - name: Get git tag + id: get_tag + if: github.event_name == 'release' + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Set version from input + if: github.event_name == 'workflow_dispatch' + run: echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV + + - name: docker login + run: | + docker login harbor.rosti.cz -u "${{ secrets.HARBOR_REPO_USERNAME }}" -p "${{ secrets.HARBOR_REPO_PASSWORD }}" + - name: Build + run: task build REPO=$IMAGE VERSION=${{ env.TAG_NAME }} + - name: Push + run: task push REPO=$IMAGE VERSION=${{ env.TAG_NAME }}