2021-04-12 19:25:34 +00:00
|
|
|
name: Push Docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push_to_registry:
|
|
|
|
name: Push Docker image to Docker Hub
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out the repo
|
|
|
|
uses: actions/checkout@v2
|
2022-04-03 23:43:29 +00:00
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2023-07-12 21:31:00 +00:00
|
|
|
uses: docker/metadata-action@v4
|
2022-04-03 23:43:29 +00:00
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
${{ github.repository_owner }}/grist
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{version}}
|
2023-07-12 21:31:00 +00:00
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
stable
|
2022-04-03 23:43:29 +00:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Log in to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
2021-04-12 19:25:34 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2022-04-03 23:43:29 +00:00
|
|
|
- name: Push to Docker Hub
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64,linux/arm64/v8
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
2022-04-07 01:41:03 +00:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|