diff --git a/.gitea/workflows/build-deploy.yaml b/.gitea/workflows/build-deploy.yaml new file mode 100644 index 0000000..0812aa6 --- /dev/null +++ b/.gitea/workflows/build-deploy.yaml @@ -0,0 +1,39 @@ +name: Arbeitszeitmessung Deploy +run-name: ${{ gitea.actor }} is building and deploying arbeitszeitmesssung +on: + push: + branches: + - "main" + tags: + - "*" + workflow_run: + workflows: [tests] + types: + - completed + +jobs: + build: + name: Build Go Image and Upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: git.letsstein.de + username: ${{ gitea.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + context: Backend + tags: | + git.letsstein.de/tom/arbeitszeitmessung:latest + git.letsstein.de/tom/arbeitszeitmessung:${{ github.ref_name }} diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/tests/go-test.yaml similarity index 60% rename from .gitea/workflows/build.yaml rename to .gitea/workflows/tests/go-test.yaml index 62c456c..3f5e644 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/tests/go-test.yaml @@ -1,6 +1,6 @@ name: GoLang Tests run-name: ${{ gitea.actor }} is testing golang Code -on: [push] +on: push jobs: testing: @@ -46,27 +46,3 @@ jobs: arbeitszeitmessung- - name: Run Go Tests run: cd Backend && go test ./... - build: - needs: testing - name: Build Go Image and Upload - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: git.letsstein.de - username: ${{ gitea.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm64 - push: true - tags: git.letsstein.de/tom/arbeitszeitmessung:latest - context: Backend