Caddy v2.8.4 #584
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |