Skip to content

Commit 8b8ded1

Browse files
committed
sip-jibri, chore: add workflow to create Docker image
1 parent 14bd867 commit 8b8ded1

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/sip-jibri.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: sip-jibri
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths:
8+
- "sip-jibri/Dockerfile"
9+
- "sip-jibri/rootfs/**"
10+
- ".github/workflows/sip-jibri.yml"
11+
12+
env:
13+
CONTEXT: sip-jibri
14+
REGISTRY: ghcr.io
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
id-token: write
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Custom metadata
29+
run: |
30+
echo "BUILD_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
31+
32+
- name: Metadata
33+
uses: docker/metadata-action@v5
34+
id: meta
35+
with:
36+
images: |
37+
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTEXT }}
38+
tags: |
39+
type=raw,value=latest
40+
type=raw,value=v${{ env.BUILD_DATE }}
41+
42+
- name: Login
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ${{ env.REGISTRY }}
46+
username: ${{ github.repository_owner }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Build and push
50+
uses: docker/build-push-action@v5
51+
with:
52+
context: ./${{ env.CONTEXT }}
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)