Spaces:
Sleeping
Sleeping
Taiga commited on
Create docker_release.yml
Browse files
.github/workflows/docker_release.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Docker Build and Push to GHCR
|
| 2 |
+
on:
|
| 3 |
+
push:
|
| 4 |
+
branches:
|
| 5 |
+
- main
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
build-and-push:
|
| 9 |
+
runs-on: ubuntu-latest
|
| 10 |
+
|
| 11 |
+
steps:
|
| 12 |
+
- name: Checkout repository
|
| 13 |
+
uses: actions/checkout@v3
|
| 14 |
+
|
| 15 |
+
- name: Log in to GitHub Container Registry
|
| 16 |
+
uses: docker/login-action@v2
|
| 17 |
+
with:
|
| 18 |
+
registry: ghcr.io
|
| 19 |
+
username: ${{ github.actor }}
|
| 20 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 21 |
+
|
| 22 |
+
- name: Build Docker image
|
| 23 |
+
run: |
|
| 24 |
+
docker build -t ghcr.io/${{ github.repository }}:latest .
|
| 25 |
+
|
| 26 |
+
- name: Push Docker image
|
| 27 |
+
run: |
|
| 28 |
+
docker push ghcr.io/${{ github.repository }}:latest
|