Spaces:
Runtime error
Runtime error
binary-husky
commited on
Commit
•
da4e483
1
Parent(s):
41f8011
Update docker-image.yml
Browse files
.github/workflows/docker-image.yml
CHANGED
@@ -1,39 +1,44 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
on:
|
4 |
push:
|
5 |
branches:
|
6 |
-
- master
|
7 |
|
8 |
env:
|
9 |
-
|
10 |
-
|
11 |
-
IMAGE_NAME: gpt-academic-nolocal
|
12 |
|
13 |
jobs:
|
14 |
-
build-and-push:
|
15 |
runs-on: ubuntu-latest
|
|
|
|
|
|
|
16 |
|
17 |
steps:
|
18 |
-
# Checkout the repository
|
19 |
- name: Checkout repository
|
20 |
-
uses: actions/checkout@
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
31 |
|
32 |
-
# Build and push the Docker image
|
33 |
- name: Build and push Docker image
|
34 |
-
uses: docker/build-push-action@
|
35 |
with:
|
36 |
context: .
|
37 |
-
dockerfile: docs/DockerfileNoLocal
|
38 |
push: true
|
39 |
-
|
|
|
|
|
|
1 |
+
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages
|
2 |
+
name: Create and publish a Docker image
|
3 |
|
4 |
on:
|
5 |
push:
|
6 |
branches:
|
7 |
+
- 'master'
|
8 |
|
9 |
env:
|
10 |
+
REGISTRY: ghcr.io
|
11 |
+
IMAGE_NAME: ${{ github.repository }}
|
|
|
12 |
|
13 |
jobs:
|
14 |
+
build-and-push-image:
|
15 |
runs-on: ubuntu-latest
|
16 |
+
permissions:
|
17 |
+
contents: read
|
18 |
+
packages: write
|
19 |
|
20 |
steps:
|
|
|
21 |
- name: Checkout repository
|
22 |
+
uses: actions/checkout@v3
|
23 |
|
24 |
+
- name: Log in to the Container registry
|
25 |
+
uses: docker/login-action@v2
|
26 |
+
with:
|
27 |
+
registry: ${{ env.REGISTRY }}
|
28 |
+
username: ${{ github.actor }}
|
29 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
30 |
|
31 |
+
- name: Extract metadata (tags, labels) for Docker
|
32 |
+
id: meta
|
33 |
+
uses: docker/metadata-action@v4
|
34 |
+
with:
|
35 |
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
36 |
|
|
|
37 |
- name: Build and push Docker image
|
38 |
+
uses: docker/build-push-action@v4
|
39 |
with:
|
40 |
context: .
|
|
|
41 |
push: true
|
42 |
+
dockerfile: docs/Dockerfile+NoLocal
|
43 |
+
tags: ${{ steps.meta.outputs.tags }}
|
44 |
+
labels: ${{ steps.meta.outputs.labels }}
|