diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index ee0e5eb15..ef8297c64 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -5,7 +5,7 @@ on: branches: [new] jobs: - build: + build-backend: runs-on: ubuntu-latest permissions: contents: read @@ -20,11 +20,38 @@ jobs: - name: Docker Setup Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to DockerHub Container registry + - name: Log in to GitHub Container registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: apps/website/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: | + ghcr.io/member-counter/website:new-beta + build-backend: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v3 - name: Log in to GitHub Container registry uses: docker/login-action@v3 @@ -37,10 +64,10 @@ jobs: uses: docker/build-push-action@v3 with: context: . + file: apps/bot/Dockerfile platforms: linux/amd64,linux/arm64 push: true cache-from: type=gha cache-to: type=gha,mode=max tags: | - eduardozgz/member-counter-bot:new-beta ghcr.io/member-counter/bot:new-beta