diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..d3c10dbb7 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,26 @@ +name: Build and publish docker image + +on: + push: + pull_request: + branches: [ main ] + +jobs: + build: + name: Build and publish docker image + runs-on: ubuntu-latest + steps: + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - + name: Build and push + uses: docker/build-push-action@v3 + with: + push: ${{ github.ref == 'refs/heads/main' }} + tags: ghcr.io/matrix-org/matrix-authentication-service:sha-${{ github.sha }}