name: Docker on: push: branches: - "handmade" tags: - "*" # TODO: Bring back once gitea is updated past 1.21 # paths-ignore: # - ".github/**" # - "!.github/workflows/docker.yml" # - ".vscode/**" # - ".gitignore" # - ".gitlab-ci.yml" # - "LICENSE" # - "README" pull_request: branches: - "handmade" # TODO: Bring back once gitea is updated past 1.21 # paths-ignore: # - ".github/**" # - "!.github/workflows/docker.yml" # - "!.github/workflows/preview_*.yml" # - ".vscode/**" # - ".gitignore" # - ".gitlab-ci.yml" # - "LICENSE" # - "README" workflow_dispatch: jobs: publish: runs-on: ubuntu-latest # NOTE: Running on pull requests for now, but without pushing. # if: github.event_name != 'pull_request' steps: - name: Checkout uses: actions/checkout@v4 with: submodules: "recursive" - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: handmadecities/handmade-revolt-web-client env: DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index - name: Login to DockerHub uses: docker/login-action@v1 if: github.event_name != 'pull_request' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and publish uses: docker/build-push-action@v6 with: context: . push: ${{ github.event_name != 'pull_request' }} platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} annotations: ${{ steps.meta.outputs.annotations }} labels: ${{ steps.meta.outputs.labels }}