Skip to content

Commit e3f53cd

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

2 files changed

Lines changed: 43 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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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: actions/checkout@v4
17+
- uses: docker/setup-qemu-action@v3
18+
- uses: docker/setup-buildx-action@v3
19+
-
20+
if: github.ref == 'refs/heads/github-actions'
21+
name: Login to ghcr.io
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
-
28+
if: github.ref == 'refs/heads/github-actions'
29+
name: Login to hub.docker.com
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKERHUB_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
-
35+
name: Build and push
36+
id: docker_build
37+
uses: docker/build-push-action@v6
38+
with:
39+
context: docker/toolbox/latest
40+
push: ${{ github.ref == 'refs/heads/github-actions' }}
41+
tags: ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest
42+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)