-
Notifications
You must be signed in to change notification settings - Fork 1k
63 lines (53 loc) · 1.72 KB
/
docker-3.2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: docker-3.2
on:
push:
branches:
- 3.2
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
env:
BUILD_VERSION: "3.2"
DOCKER_CLI_EXPERIMENTAL: enabled
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Source checkout
uses: actions/checkout@v3
- name: Setup QEMU
id: qemu
uses: docker/[email protected]
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Set Docker metadata
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
labels: |
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=${{ github.repository }}
- name: GitHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
push: ${{ github.event_name != 'pull_request' }}
context: .
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: |
ghcr.io/${{ github.repository }}:${{ env.BUILD_VERSION }}
ghcr.io/${{ github.repository }}:latest