create pipiline dockerfile
Some checks failed
Gitea Actions Demo / build-and-run (push) Failing after 1m24s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
eko
2026-03-16 04:36:12 +07:00
parent 642d72229e
commit be68c4b10f

View File

@@ -7,19 +7,20 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v5 # Updated to v5
with: with:
context: . context: .
push: true push: true
tags: "latest" tags: ${{ github.repository }}:latest
- name: Run container - name: Run container
uses: docker/run-action@v2 run: |
with: docker run -d -p 8000:8000 ${{ github.repository }}:latest
image: ${{ github.repository }}:latest
ports: ["8000:8000"]