element-web/.github/workflows/dockerhub.yaml

62 lines
2 KiB
YAML
Raw Normal View History

name: Dockerhub
on:
2022-12-09 12:28:29 +00:00
workflow_dispatch: {}
push:
tags: [v*]
schedule:
# This job can take a while, and we have usage limits, so just publish develop only twice a day
- cron: "0 7/12 * * *"
concurrency: ${{ github.ref_name }}
jobs:
2022-12-09 12:28:29 +00:00
buildx:
name: Docker Buildx
runs-on: ubuntu-latest
environment: dockerhub
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for docker-package to be able to calculate the version
2022-12-09 12:28:29 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
2022-12-09 12:28:29 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
2022-12-09 12:28:29 +00:00
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-12-09 12:28:29 +00:00
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
vectorim/element-web
tags: |
type=ref,event=branch
type=ref,event=tag
flavor: |
latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }}
2022-12-09 12:28:29 +00:00
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2022-12-09 12:28:29 +00:00
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
continue-on-error: true
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: vectorim/element-web