2020-11-18 20:17:11 +01:00
|
|
|
name: Publish Docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2020-11-18 20:27:16 +01:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
2020-11-18 20:17:11 +01:00
|
|
|
|
|
|
|
- name: Cache Docker layers
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /tmp/.buildx-cache
|
|
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-buildx-
|
|
|
|
|
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2020-12-03 22:02:51 +01:00
|
|
|
|
|
|
|
- name: Limit concurrent builds to 1
|
|
|
|
uses: softprops/turnstyle@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-11-18 20:17:11 +01:00
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: codetheweb/muse:latest
|
2020-11-18 20:24:43 +01:00
|
|
|
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
2021-01-07 18:52:10 +01:00
|
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
|
|
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
|
2020-11-18 20:17:11 +01:00
|
|
|
|
|
|
|
- name: Update Docker Hub description
|
|
|
|
uses: peter-evans/dockerhub-description@v2.1.0
|
|
|
|
env:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
2020-11-18 21:43:30 +01:00
|
|
|
DOCKERHUB_REPOSITORY: codetheweb/muse
|
2020-11-18 20:17:11 +01:00
|
|
|
|