2024-12-09 12:32:31 +01:00
|
|
|
|
2021-03-06 12:31:31 +01:00
|
|
|
name: build docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2021-03-16 19:59:46 +01:00
|
|
|
- "**"
|
2021-03-06 12:31:31 +01:00
|
|
|
|
|
|
|
jobs:
|
2021-03-06 13:28:03 +01:00
|
|
|
build:
|
2023-01-19 19:57:03 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2021-03-06 13:28:03 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout the code
|
2023-09-05 06:59:56 +02:00
|
|
|
uses: actions/checkout@v4
|
2021-03-06 13:03:08 +01:00
|
|
|
# https://github.com/docker/setup-qemu-action
|
|
|
|
- name: Set up QEMU
|
2023-09-15 19:07:34 +02:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2021-03-06 13:03:08 +01:00
|
|
|
# https://github.com/docker/setup-buildx-action
|
|
|
|
- name: Set up Docker Buildx
|
2023-09-13 07:03:02 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-03-06 12:31:31 +01:00
|
|
|
- name: Get latest release version number
|
2021-03-06 12:42:35 +01:00
|
|
|
id: docker-tag
|
|
|
|
uses: yuya-takeyama/docker-tag-from-github-ref-action@v1
|
2021-03-06 12:31:31 +01:00
|
|
|
- name: Login to Docker Hub
|
2023-09-15 19:56:06 +02:00
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
2024-09-10 19:52:19 +02:00
|
|
|
username: fradelg
|
2023-09-15 19:56:06 +02:00
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2021-03-06 12:31:31 +01:00
|
|
|
- name: Build multiarch image
|
|
|
|
run: |
|
|
|
|
docker buildx build --push \
|
2021-03-06 12:42:35 +01:00
|
|
|
--tag fradelg/mysql-cron-backup:${{ steps.docker-tag.outputs.tag }} \
|
2024-09-10 19:25:10 +02:00
|
|
|
--platform linux/amd64,linux/arm/v7,linux/arm64 .
|