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 * * *"
|
2023-03-30 08:55:09 -04:00
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
|
2022-07-29 09:30:16 -04:00
|
|
|
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:
|
2023-09-05 13:31:32 -04:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-29 09:30:16 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # needed for docker-package to be able to calculate the version
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2023-09-21 20:23:41 -04:00
|
|
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
|
2022-07-29 09:30:16 -04:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2023-09-21 20:23:41 -04:00
|
|
|
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
|
2022-07-29 09:30:16 -04:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2023-09-21 20:23:41 -04:00
|
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
|
2022-07-29 09:30:16 -04:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2023-09-21 20:23:41 -04:00
|
|
|
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5
|
2022-07-29 09:30:16 -04:00
|
|
|
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
|
2023-09-21 20:23:41 -04:00
|
|
|
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5
|
2022-07-29 09:30:16 -04:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
|
|
- name: Update repo description
|
2023-06-27 13:12:11 -04:00
|
|
|
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 # v3
|
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
|