-
Notifications
You must be signed in to change notification settings - Fork 489
40 lines (38 loc) · 1.04 KB
/
build.yaml
File metadata and controls
40 lines (38 loc) · 1.04 KB
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
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