From ce3546e1e423302f0d667c38083b19be38793ba3 Mon Sep 17 00:00:00 2001 From: a Date: Tue, 4 Jun 2024 00:22:49 -0500 Subject: [PATCH] noot --- .gitea/workflows/commit_tag.yml | 44 ++++++++++++++++++++++++++++++++ .gitea/workflows/release_tag.yml | 7 ++--- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/commit_tag.yml diff --git a/.gitea/workflows/commit_tag.yml b/.gitea/workflows/commit_tag.yml new file mode 100644 index 0000000..abbf6b3 --- /dev/null +++ b/.gitea/workflows/commit_tag.yml @@ -0,0 +1,44 @@ +name: commit-tag +on: + push +jobs: + release-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + env: + DOCKER_ORG: teacup + DOCKER_LATEST: nightly + RUNNER_TOOL_CACHE: /toolcache + steps: + - name: Checkout + uses: actions/checkout@v3 +## - name: Set up QEMU +## uses: docker/setup-qemu-action@v2 + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + registry: https://tuxpa.in + username: ${{ gitea.repository_owner }} + password: ${{ secrets.GITEA_TOKEN }} + + - 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@v4 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + linux/arm64 + push: true + tags: | + tuxpa.in/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} + diff --git a/.gitea/workflows/release_tag.yml b/.gitea/workflows/release_tag.yml index c71df2c..3dc862a 100644 --- a/.gitea/workflows/release_tag.yml +++ b/.gitea/workflows/release_tag.yml @@ -1,6 +1,8 @@ name: release-tag on: - push + push: + tags: + - 'v*' jobs: release-image: runs-on: ubuntu-latest @@ -40,6 +42,5 @@ jobs: linux/arm64 push: true tags: | - tuxpa.in/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} - tuxpa.in/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} + tuxpa.in/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ gitea.ref_name }}