From 567fb71ca7223b710e8226e0440e6bda7b36d2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Thu, 7 Dec 2023 00:08:33 +0100 Subject: [PATCH] Release as version v0.1.2 --- .gitea/workflows/release-nightly.yml | 2 - .gitea/workflows/release-tag.yml | 58 ++++++++++++++++++++++++++++ main.go | 2 +- 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/release-tag.yml diff --git a/.gitea/workflows/release-nightly.yml b/.gitea/workflows/release-nightly.yml index 0ab2b2e..e5b81ae 100644 --- a/.gitea/workflows/release-nightly.yml +++ b/.gitea/workflows/release-nightly.yml @@ -24,8 +24,6 @@ jobs: fetch-depth: 0 # all history for all branches and tags submodules: true github-server-url: 'https://git.t-juice.club' - # ssh-known-hosts: "{{ secret.SSH_KNOWN_HOSTS }}" - # ssh-key: "{{ secret.SSH_KEY }}" - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml new file mode 100644 index 0000000..905e14d --- /dev/null +++ b/.gitea/workflows/release-tag.yml @@ -0,0 +1,58 @@ +name: release-tag + +on: + push: + tags: + - '*' + +env: + REGISTRY: git.t-juice.club + IMAGE_NAME: ${{ gitea.repository }} + DOCKER_TAG: latest + +jobs: + release-image: + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + env: + DOCKER_ORG: torjus + DOCKER_TAG: nightly + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + submodules: true + github-server-url: 'https://git.t-juice.club' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + + - name: Login to git.t-juice.club registry + uses: docker/login-action@v3 + with: + registry: git.t-juice.club + username: ${{ gitea.actor }} + password: ${{ secrets.DOCKER_PUSH }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/${{ gitea.repository }}:${{ steps.meta.outputs.REPO_VERSION }} + ${{ env.REGISTRY }}/${{ gitea.repository }}:${{ env.DOCKER_TAG }} diff --git a/main.go b/main.go index 654bb34..d0b6131 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( "github.com/urfave/cli/v2" ) -const Version = "v0.1.1" +const Version = "v0.1.2" type ctxKey string