diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fb3cadf..3c59fbe 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -32,11 +32,8 @@ jobs: build-Docker: - runs-on: ${{ matrix.arch }} - name: Build Containers - strategy: - matrix: - arch: ['ubuntu-latest'] + runs-on: ubuntu-latest + name: Build Container (amd64) needs: [build] # for ignoring bad builds if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) @@ -45,9 +42,6 @@ jobs: with: github-server-url: https://gitea.sheep-ghoul.ts.net - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -62,11 +56,68 @@ jobs: uses: docker/build-push-action@v5 with: push: true - platforms: linux/amd64,linux/arm64 - tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest + tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64 file: Dockerfile context: . + # build-Docker-Arm: + + # runs-on: ubuntu-latest-arm + # name: Build Container (arm64) + # needs: [build] # for ignoring bad builds + # if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) + + # steps: + # - uses: actions/checkout@v4 + # with: + # github-server-url: https://gitea.sheep-ghoul.ts.net + + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v2 + + # - name: Login to DockerHub + # uses: docker/login-action@v2 + # with: + # registry: gitea.sheep-ghoul.ts.net + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + + # - name: Build Web Container + # uses: docker/build-push-action@v5 + # with: + # push: true + # tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-arm64 + # file: Dockerfile + # context: . + + packageManifest: + runs-on: ubuntu-latest + name: Container Manifest + needs: [ build-Docker, build-Docker-Arm ] # for ignoring bad builds + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v4 + with: + github-server-url: https://gitea.sheep-ghoul.ts.net + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + registry: gitea.sheep-ghoul.ts.net + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Create and push manifest images + uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab + with: + inputs: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest + images: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64 + # images: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64,gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-arm64 + push: true + publish: runs-on: ubuntu-latest name: Publish Charts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c88d261..a08782c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,20 +29,14 @@ jobs: build-Docker: - runs-on: ${{ matrix.arch }} - name: Build Containers - strategy: - matrix: - arch: ['ubuntu-latest'] + runs-on: ubuntu-latest + name: Build Container (amd64) needs: [build] # for ignoring bad builds if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) steps: - 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 @@ -56,12 +50,70 @@ jobs: uses: docker/build-push-action@v5 with: push: true - platforms: linux/amd64,linux/arm64 tags: | - sarsoo/overflow:latest - sarsoo/overflow:${{ github.ref_name }} + sarsoo/overflow:latest-amd64 + sarsoo/overflow:${{ github.ref_name }}-amd64 file: Dockerfile + build-Docker-Arm: + + runs-on: ubuntu-24.04-arm + name: Build Container (arm64) + needs: [build] # for ignoring bad builds + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) + + steps: + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build Web Container + uses: docker/build-push-action@v5 + with: + push: true + tags: | + sarsoo/overflow:latest-arm64 + sarsoo/overflow:${{ github.ref_name }}-arm64 + file: Dockerfile + + packageManifest: + runs-on: ubuntu-latest + name: Container Manifest + needs: [ build-Docker, build-Docker-Arm ] # for ignoring bad builds + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Create and push manifest images + uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab + with: + inputs: sarsoo/overflow:latest + images: sarsoo/overflow:latest-amd64,sarsoo/overflow:latest-arm64 + push: true + + - name: Create and push manifest images + uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab + with: + inputs: sarsoo/overflow:${{ github.ref_name }} + images: sarsoo/overflow:${{ github.ref_name }}-amd64,sarsoo/overflow:${{ github.ref_name }}-arm64 + push: true + # deploy: # runs-on: ubuntu-latest @@ -80,7 +132,7 @@ jobs: # oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} # oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} # tags: tag:ci - # version: 1.68.1 + # version: 1.80.3 # - name: Deploy # run: ssh -o StrictHostKeyChecking=no ${{ secrets.TS_SSH }} -t "cd overflow/ && docker compose up -d --pull always" \ No newline at end of file