2022-04-11 05:15:15 +02:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*.*.*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_deploy:
|
|
|
|
name: Build and Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-04-11 05:15:15 +02:00
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
id: meta
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: docker/metadata-action@v4
|
2022-04-11 05:15:15 +02:00
|
|
|
with:
|
|
|
|
images: ekzhang/bore
|
|
|
|
tags: |
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-04-11 05:15:15 +02:00
|
|
|
with:
|
|
|
|
platforms: arm64
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-04-11 05:15:15 +02:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: docker/login-action@v2
|
2022-04-11 05:15:15 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
2022-11-11 07:42:04 +01:00
|
|
|
uses: docker/build-push-action@v3
|
2022-04-11 05:15:15 +02:00
|
|
|
with:
|
2022-11-11 07:42:04 +01:00
|
|
|
# This doesn't work now because of an issue in multi-platform Docker builds.
|
|
|
|
# -> see https://github.com/rust-lang/rust/issues/97520
|
|
|
|
# platforms: linux/amd64,linux/arm64
|
2022-04-11 05:15:15 +02:00
|
|
|
push: true
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
|
|
|
|
- name: Image digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|