Skip to content

Commit 544b1dc

Browse files
committed
CI: modernize builder
1 parent a50b959 commit 544b1dc

File tree

1 file changed

+15
-43
lines changed

1 file changed

+15
-43
lines changed

.github/workflows/docker.yml

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,27 @@
1-
name: Docker
1+
name: "Docker"
22

33
on:
4+
workflow_dispatch:
5+
46
push:
5-
branches: ["*"]
7+
branches: ["master"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
611

712
jobs:
8-
docker:
9-
runs-on: ubuntu-latest
13+
build:
14+
name: "Build"
15+
uses: dockette/.github/.github/workflows/docker.yml@master
16+
secrets: inherit
17+
with:
18+
image: "dockette/deploy"
19+
tag: "${{ matrix.tag }}"
20+
context: "${{ matrix.context }}"
1021
strategy:
1122
matrix:
1223
include:
1324
- tag: "deployer7"
1425
context: "deployer/v7"
1526
- tag: "deployer6"
1627
context: "deployer/v6"
17-
18-
fail-fast: false
19-
20-
name: Docker (dockette/deploy:${{ matrix.tag }})
21-
22-
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v2
25-
26-
- name: Login to DockerHub
27-
uses: docker/login-action@v1
28-
with:
29-
username: ${{ secrets.DOCKERHUB_USERNAME }}
30-
password: ${{ secrets.DOCKERHUB_TOKEN }}
31-
32-
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@v1
34-
35-
- name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v1
37-
38-
- name: Cache Docker layers
39-
uses: actions/cache@v2
40-
with:
41-
path: /tmp/.buildx-cache
42-
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.tag }}
43-
restore-keys: |
44-
${{ runner.os }}-buildx-
45-
46-
- name: Build and push
47-
if: github.ref == 'refs/heads/master'
48-
uses: docker/build-push-action@v2
49-
with:
50-
context: ${{ matrix.context }}
51-
push: true
52-
tags: dockette/deploy:${{ matrix.tag }}
53-
cache-from: type=local,src=/tmp/.buildx-cache
54-
cache-to: type=local,dest=/tmp/.buildx-cache
55-
platforms: ${{ matrix.platforms || 'linux/amd64,linux/arm64' }}

0 commit comments

Comments
 (0)