etherpad-lite/.github/workflows/docker.yml

41 lines
1 KiB
YAML
Raw Normal View History

name: Docker
on:
push:
branches:
- 'develop'
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
steps:
2022-01-27 23:43:05 +01:00
-
name: Check out
uses: actions/checkout@v2
2022-01-27 23:43:05 +01:00
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: etherpad/etherpad
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
2022-01-27 23:43:05 +01:00
-
name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-01-27 23:43:05 +01:00
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}