Build and push Docker images weekly #67
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: Build and push Docker images weekly | |
on: | |
schedule: | |
- cron: "12 16 * * 2" | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
container: | |
image: hairyhenderson/dockerfiles-builder:latest | |
env: | |
BASHBREW_LIBRARY: ./library | |
BASHBREW_NAMESPACE: productionwentdown | |
BASHBREW_ARCH_NAMESPACES: amd64=productionwentdown | |
if: github.repository == 'productionwentdown/caddy' && github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build images on Linux | |
run: | | |
bashbrew build --pull always caddy | |
- name: Push images | |
run: | | |
wget https://github.com/estesp/manifest-tool/releases/download/v1.0.2/manifest-tool-linux-amd64 -O /usr/local/bin/manifest-tool | |
chmod +x /usr/local/bin/manifest-tool | |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
bashbrew push caddy | |
bashbrew put-shared --single-arch caddy |