2021-08-09 12:21:10 +02:00
|
|
|
name: docker-3.1dev
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 3.1dev
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 8 * * 1"
|
|
|
|
|
|
|
|
env:
|
2021-08-09 13:14:07 +02:00
|
|
|
BUILD_VERSION: "3.1dev"
|
2021-08-09 12:21:10 +02:00
|
|
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Source checkout
|
|
|
|
uses: actions/checkout@v2.3.4
|
|
|
|
|
|
|
|
- name: Setup QEMU
|
|
|
|
id: qemu
|
|
|
|
uses: docker/setup-qemu-action@v1.2.0
|
|
|
|
|
|
|
|
- name: Setup Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Set Docker metadata
|
|
|
|
id: docker_meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
2021-08-09 13:58:03 +02:00
|
|
|
images: ${{ github.repository }}
|
2021-08-09 12:21:10 +02:00
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
|
|
|
|
org.opencontainers.image.revision=${{ github.sha }}
|
2021-08-09 13:58:03 +02:00
|
|
|
org.opencontainers.image.title=${{ github.repository }}
|
2021-08-09 12:21:10 +02:00
|
|
|
|
|
|
|
- name: GitHub login
|
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
|
|
uses: docker/login-action@v1.10.0
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v2.6.1
|
|
|
|
with:
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2021-08-09 12:36:17 +02:00
|
|
|
context: .
|
2021-08-09 12:21:10 +02:00
|
|
|
file: Dockerfile.git
|
|
|
|
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le
|
|
|
|
build-args: BUILD_VERSION
|
|
|
|
cache-from: type=gha, scope=${{ github.workflow }}
|
|
|
|
cache-to: type=gha, scope=${{ github.workflow }}
|
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
|
|
|
tags: |
|
2021-08-09 13:58:03 +02:00
|
|
|
ghcr.io/${{ github.repository }}:${{ env.BUILD_VERSION }}
|
|
|
|
ghcr.io/${{ github.repository }}:latest
|