2022-07-29 09:30:16 -04:00
|
|
|
name: Dockerhub
|
|
|
|
on:
|
|
|
|
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:
|
|
|
|
buildx:
|
|
|
|
name: Docker Buildx
|
|
|
|
runs-on: ubuntu-latest
|
2022-07-29 09:41:05 -04:00
|
|
|
environment: dockerhub
|
2022-07-29 09:30:16 -04:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0 # needed for docker-package to be able to calculate the version
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
vectorim/element-web
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=tag
|
2022-09-14 09:10:12 -04:00
|
|
|
flavor: |
|
|
|
|
latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }}
|
2022-07-29 09:30:16 -04:00
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
|
|
- name: Update repo description
|
|
|
|
uses: peter-evans/dockerhub-description@v2
|
2022-07-29 10:19:51 -04:00
|
|
|
continue-on-error: true
|
2022-07-29 09:30:16 -04:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
repository: vectorim/element-web
|