From 1e24ed65cd2a2f1ec1a955a1e8bef22515ad9573 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 30 Mar 2025 16:16:52 -0500 Subject: [PATCH] make a separate release workflow --- .gitea/workflows/ci.yaml | 31 ------------------- .gitea/workflows/release.yaml | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 .gitea/workflows/release.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 0eadc0f..1d14328 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -39,34 +39,3 @@ jobs: bundler-cache: true - run: bundle exec rake - - release-image: - needs: test - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - env: - DOCKER_ORG: ryanc - DOCKER_LATEST: latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # all history for all branches and tags - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Gitea registry - uses: docker/login-action@v3 - with: - registry: git.kill0.net - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Docker build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: git.kill0.net/ryanc/kubernaut:latest diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..260fdc0 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,57 @@ +name: release + +on: + schedule: + - cron: "0 10 * * *" + push: + branches: + - "**" + tags: + - "v*.*.*" + pull_request: + +jobs: + docker: + needs: test + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + env: + DOCKER_ORG: ryanc + DOCKER_LATEST: latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + image: | + git.kill0.net/ryanc/kubernaut + with: + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Gitea registry + uses: docker/login-action@v3 + with: + registry: git.kill0.net + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Docker build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: git.kill0.net/ryanc/kubernaut:latest