Skip to content

Commit dd4850c

Browse files
authored
Add workflow for building and pushing nightly deepsparse docker images (#1144)
1 parent 8f6d5a2 commit dd4850c

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish Nightly Docker Images
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
schedule:
8+
- cron: '0 1 * * *'
9+
workflow_dispatch:
10+
jobs:
11+
push-nightly-docker-image:
12+
name: Push Version Tagged Nightly Docker Images
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Set up Docker Buildx
20+
id: buildx
21+
uses: docker/setup-buildx-action@v2
22+
with:
23+
buildkitd-flags: --debug
24+
25+
- name: Login to Github Packages
26+
uses: docker/login-action@v2
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Checkout code
33+
uses: actions/checkout@v3
34+
with:
35+
fetch-depth: 1
36+
37+
- name: Get version tag
38+
id: extract_tag
39+
run: echo "tag=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
40+
41+
- name: Current Version Name
42+
run: |
43+
echo ${{ steps.extract_tag.outputs.tag }}
44+
45+
- name: DeepSparse-Nightly latest
46+
uses: docker/build-push-action@v2
47+
with:
48+
context: ./docker
49+
build-args: |
50+
DEPS=all
51+
BRANCH=main
52+
push: true
53+
tags: |
54+
ghcr.io/neuralmagic/deepsparse-nightly:latest
55+
56+
- name: Today's DeepSparse-Nightly
57+
uses: docker/build-push-action@v2
58+
with:
59+
context: ./docker
60+
build-args: |
61+
DEPS=all
62+
BRANCH=main
63+
push: true
64+
tags: |
65+
ghcr.io/neuralmagic/deepsparse-nightly:${{ steps.extract_tag.outputs.tag }}
66+
67+
- name: Today's DeepSparse-Nightly Base
68+
uses: docker/build-push-action@v2
69+
with:
70+
context: ./docker
71+
build-args: |
72+
DEPS=base
73+
BRANCH=main
74+
push: true
75+
tags: |
76+
ghcr.io/neuralmagic/deepsparse-nightly:base-${{ steps.extract_tag.outputs.tag }}
77+
78+
- name: Image digest
79+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)