Spaces:
Runtime error
Runtime error
Petzys
commited on
Commit
·
34b5e8d
1
Parent(s):
531b3e4
Feat: automatic push to docker hub
Browse files
.github/workflows/docker_build_push.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Docker Build and Push
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
docker:
|
| 10 |
+
environment: Dockerhub
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
steps:
|
| 13 |
+
-
|
| 14 |
+
name: Login to Docker Hub
|
| 15 |
+
uses: docker/login-action@v3
|
| 16 |
+
with:
|
| 17 |
+
username: ${{ vars.DOCKERHUB_USERNAME }}
|
| 18 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 19 |
+
-
|
| 20 |
+
name: Set up Docker Buildx
|
| 21 |
+
uses: docker/setup-buildx-action@v3
|
| 22 |
+
-
|
| 23 |
+
name: Build and push
|
| 24 |
+
uses: docker/build-push-action@v6
|
| 25 |
+
with:
|
| 26 |
+
push: true
|
| 27 |
+
platforms: linux/amd64
|
| 28 |
+
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:latest
|