create pipiline dockerfile
This commit is contained in:
@@ -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"]
|
|
||||||
Reference in New Issue
Block a user