Spaces:
Sleeping
Sleeping
Create docker-image.yml
Browse files
.github/workflows/docker-image.yml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Docker Image CI
|
2 |
+
permissions: write-all
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ "main" ]
|
6 |
+
pull_request:
|
7 |
+
branches: [ "main" ]
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
build:
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
|
13 |
+
steps:
|
14 |
+
- uses: actions/checkout@v4
|
15 |
+
|
16 |
+
- name: Log in to GitHub Container Registry
|
17 |
+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
18 |
+
|
19 |
+
- name: Build the Docker image
|
20 |
+
run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/notion2api:latest
|
21 |
+
|
22 |
+
- name: Push the Docker image
|
23 |
+
run: docker push ghcr.io/${{ github.repository_owner }}/notion2api:latest
|