From ee903f8bd65cec4e46461faf09d4f08d3e2d1484 Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Tue, 13 Jan 2026 10:04:44 -0500 Subject: [PATCH] added in gitea actions --- .gitea/workflows/build.yaml | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 746754c..655a2e0 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,13 +1,36 @@ name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing Gitea Actions 🚀 -on: [push] +run-name: ${{ gitea.actor }} is building the chore app 🚀 +on: + push: + branches: + - master + - next + jobs: - Explore-Gitea-Actions: + build-and-push: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server!" - name: Check out repository code uses: actions/checkout@v3 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code." \ No newline at end of file + + - name: Determine Image Tag + id: vars + run: | + if [ "${{ gitea.ref }}" == "refs/heads/master" ]; then + echo "tag=latest" >> $GITHUB_OUTPUT + else + echo "tag=next" >> $GITHUB_OUTPUT + fi + + - name: Build Docker Image + run: | + docker build -t gitea-server:3000/ryan/chore:${{ steps.vars.outputs.tag }} . + + - name: Log in to Registry + run: | + # Use your Gitea credentials (secrets are safer, but this works for testing) + echo "0x013h" | docker login gitea-server:3000 -u ryan --password-stdin + + - name: Push Image to Gitea Registry + run: | + docker push gitea-server:3000/ryan/chore:${{ steps.vars.outputs.tag }} \ No newline at end of file