Build and publish docker image from main branch (#227)

This commit is contained in:
Hugh Nimmo-Smith
2022-06-06 19:02:46 +01:00
committed by GitHub
parent 25ff76e6b7
commit a4e883b68f
+26
View File
@@ -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 }}