mirror of
https://github.com/nicolabs/musiccast-repairkit.git
synced 2025-09-07 16:10:34 +02:00
Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v1 to v2.1.1. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v1...ac90ddf06eee55fbe48897eeec38bba2f7948e7e) Signed-off-by: dependabot[bot] <support@github.com>
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
# Some refs :
|
|
# - Starting : https://docs.docker.com/ci-cd/github-actions/
|
|
# - More details here : https://github.com/marketplace/actions/build-and-push-docker-images#update-dockerhub-repo-description
|
|
# - Variables (contexts) : https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
|
|
|
|
name: Docker Hub
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- 'v*.*.*'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
|
|
build-publish:
|
|
name: Build, Publish
|
|
environment: prod
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Docker meta
|
|
id: docker_meta
|
|
uses: crazy-max/ghaction-docker-meta@v2.1.1
|
|
with:
|
|
# list of Docker images to use as base name for tags
|
|
images: nicolabs/musiccast-repairkit
|
|
# add git short SHA as Docker tag
|
|
tag-sha: true
|
|
|
|
- name: Set up QEMU for multiarch
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
- name: Build and push image
|
|
id: docker_build_alpine
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: ./
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
|
|
push: true
|
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
|
|
|
- name: Image digest
|
|
run: echo ${{ steps.docker_build_alpine.outputs.digest }}
|
|
|
|
post:
|
|
|
|
name: Update repo
|
|
needs:
|
|
- build-publish
|
|
environment: prod
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
# https://github.com/peter-evans/dockerhub-description
|
|
- name: Update repo description
|
|
uses: peter-evans/dockerhub-description@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
repository: nicolabs/musiccast-repairkit
|