Skip to content

Commit 293f85b

Browse files
authored
[Chore] Build and publish dev image workflow (alexjustesen#898)
1 parent 190c96b commit 293f85b

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/dev.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and push dev Docker images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 4 * * *'
9+
10+
env:
11+
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
12+
13+
jobs:
14+
build_and_push_image:
15+
runs-on: ubuntu-22.04
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to the Container registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Extract metadata (tags, labels) for Docker
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: |
42+
ghcr.io/${{ github.repository }}
43+
tags: |
44+
type=raw,value=dev
45+
46+
- name: Build and push Docker images
47+
uses: docker/build-push-action@v5
48+
with:
49+
context: .
50+
push: true
51+
platforms: ${{ env.PLATFORMS }}
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)