Skip to content

Commit 3e024ed

Browse files
committed
feat: add tmp docker
1 parent 28ce08c commit 3e024ed

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/docker-ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Docker CI
2+
3+
on:
4+
push:
5+
branches: [ feat-update-deps-tmp-docker ]
6+
7+
env:
8+
IMAGE_NAME: ghcr.io/${{ github.repository }}
9+
IMAGE_SOURCE: https://github.com/${{ github.repository }}
10+
11+
12+
jobs:
13+
# Push image to GitHub Packages.
14+
push:
15+
runs-on: ubuntu-latest
16+
if: github.event_name == 'push'
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Build image
22+
run: |
23+
docker build . \
24+
--label "org.opencontainers.image.source=${IMAGE_SOURCE}" \
25+
--label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \
26+
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \
27+
--label "org.opencontainers.image.licenses=LGPL-3.0,AGPL-3.0" \
28+
-f ./Dockerfile -t "${IMAGE_NAME}"
29+
30+
- name: Login to GHCR
31+
uses: docker/login-action@v2
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.repository_owner }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Push image
38+
run: |
39+
VERSION=update-deps-20250421
40+
echo IMAGE_NAME=$IMAGE_NAME
41+
echo VERSION=$VERSION
42+
docker tag $IMAGE_NAME $IMAGE_NAME:$VERSION
43+
docker push $IMAGE_NAME:$VERSION

0 commit comments

Comments
 (0)