2022-07-29 09:30:16 -04:00
|
|
|
name: Dockerhub
|
|
|
|
on:
|
2022-12-09 07:28:29 -05: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 * * *"
|
2023-03-30 08:55:09 -04:00
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
|
2022-07-29 09:30:16 -04:00
|
|
|
jobs:
|
2022-12-09 07:28:29 -05: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-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Set up QEMU
|
2023-06-27 08:32:40 -04:00
|
|
|
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
|
2022-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Set up Docker Buildx
|
2023-07-17 14:01:38 -04:00
|
|
|
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2
|
2022-12-09 07:28:29 -05:00
|
|
|
with:
|
|
|
|
install: true
|
2022-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Login to Docker Hub
|
2023-06-27 07:40:08 -04:00
|
|
|
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
|
2022-12-09 07:28:29 -05:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2022-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2023-06-26 10:32:46 -04:00
|
|
|
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4
|
2022-12-09 07:28:29 -05:00
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
vectorim/element-web
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=tag
|
|
|
|
flavor: |
|
|
|
|
latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }}
|
2022-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Build and push
|
2023-06-22 09:41:00 -04:00
|
|
|
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4
|
2022-12-09 07:28:29 -05:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-07-29 09:30:16 -04:00
|
|
|
|
2022-12-09 07:28:29 -05:00
|
|
|
- name: Update repo description
|
2023-06-27 13:12:11 -04:00
|
|
|
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 # v3
|
2022-12-09 07:28:29 -05:00
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
repository: vectorim/element-web
|