-
Notifications
You must be signed in to change notification settings - Fork 75
62 lines (61 loc) · 2.9 KB
/
docker.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
name: Docker Build
on:
push:
branches:
- master
pull_request:
jobs:
docker-linux-build:
runs-on: ubuntu-latest
container:
image: hairyhenderson/dockerfiles-builder:latest
env:
BASHBREW_LIBRARY: ./library
BASHBREW_NAMESPACE: caddy
DOCKER_BUILDKIT: '1'
steps:
- uses: actions/checkout@master
- name: non-master build test
run: |
docker build -f 2.8/alpine/Dockerfile 2.8/alpine
docker build -f 2.8/builder/Dockerfile 2.8/builder
if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master'
- name: build
run: bashbrew build caddy
- name: push
# NOTE: DOCKERHUB_TOKEN and DOCKERHUB_USERNAME must be present in https://github.com/caddyserver/caddy-docker/settings
# the user must have permission to push to https://hub.docker.com/r/caddy/caddy
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
bashbrew push caddy
if: github.repository == 'caddyserver/caddy-docker' && github.ref == 'refs/heads/master'
- name: push (non-master dry run)
run: |
bashbrew push --dry-run caddy
if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master'
docker-windows-build:
runs-on: windows-2019
# env:
# BASHBREW_LIBRARY: ./library
# BASHBREW_NAMESPACE: caddy
steps:
- uses: actions/checkout@master
- name: non-master build test
run: |
docker build -f 2.8/windows/1809/Dockerfile 2.8/windows
if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master'
- name: install bashbrew
run: curl -o /bashbrew.exe https://doi-janky.infosiftr.net/job/bashbrew/job/master/lastSuccessfulBuild/artifact/bashbrew-windows-amd64.exe
- name: build
run: /bashbrew --arch windows-amd64 --constraint windowsservercore-1809 --namespace caddy --library ./library build caddy
- name: push
# NOTE: DOCKERHUB_TOKEN and DOCKERHUB_USERNAME must be present in https://github.com/caddyserver/caddy-docker/settings
# the user must have permission to push to https://hub.docker.com/r/caddy/caddy
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin;
/bashbrew --arch windows-amd64 --constraint windowsservercore-1809 --namespace caddy --library ./library push caddy
if: github.repository == 'caddyserver/caddy-docker' && github.ref == 'refs/heads/master'
- name: push (non-master dry run)
run: |
/bashbrew --arch windows-amd64 --constraint windowsservercore-1809 --namespace caddy --library ./library push --dry-run caddy
if: github.repository != 'caddyserver/caddy-docker' || github.ref != 'refs/heads/master'