Skip to content

Commit dc4e544

Browse files
committed
[WIP] add github workflow build
1 parent ebc4fac commit dc4e544

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ insert_final_newline = false
1717
[Makefile]
1818
indent_style = tab
1919

20-
[*.yml]
20+
[{*.yml,*.yaml}]
2121
indent_size = 2
2222

2323
[*.conf]

.github/workflows/build.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: build
2+
3+
on:
4+
schedule:
5+
# build every day at midnight
6+
- cron: '0 0 * * *'
7+
push:
8+
pull_request:
9+
branches: [ master ]
10+
workflow_dispatch:
11+
12+
jobs:
13+
'webdevops-toolbox-latest':
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: docker/setup-qemu-action@v3
17+
- uses: docker/setup-buildx-action@v3
18+
-
19+
if: github.ref == 'refs/heads/master'
20+
name: Login to ghcr.io
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
-
27+
if: github.ref == 'refs/heads/master'
28+
name: Login to hub.docker.com
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
-
34+
name: Build and push
35+
id: docker_build
36+
uses: docker/build-push-action@v6
37+
with:
38+
context: webdevops/toolbox:latest
39+
push: ${{ github.ref == 'refs/heads/master' }}
40+
tags: ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest

0 commit comments

Comments
 (0)