[WIP] add github workflow build #1
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| schedule: | |
| # build every day at midnight | |
| - cron: '0 0 * * *' | |
| push: | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| 'webdevops-toolbox-latest': | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - | |
| if: github.ref == 'refs/heads/master' | |
| name: Login to ghcr.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - | |
| if: github.ref == 'refs/heads/master' | |
| name: Login to hub.docker.com | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Build and push | |
| id: docker_build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: webdevops/toolbox:latest | |
| push: ${{ github.ref == 'refs/heads/master' }} | |
| tags: ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest |