dockerhub integration
All checks were successful
Build and Test / build-image (push) Successful in 26s
All checks were successful
Build and Test / build-image (push) Successful in 26s
This commit is contained in:
@@ -11,12 +11,16 @@ jobs:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4 # Uses a standard action to check out the repository code
|
||||
|
||||
- name: Login to the DockerHub registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
# docker build -t testimage:latest .
|
||||
docker run --rm testimage:latest
|
||||
docker images
|
||||
|
||||
docker build -t ${{ variables.DOCKERHUB_IMAGENAME }} .
|
||||
docker push
|
||||
|
||||
- name: Run tests (example)
|
||||
run: echo "Tests passed!"
|
||||
run: docker run --rm ${{ variables.DOCKERHUB_IMAGENAME }}
|
||||
|
||||
Reference in New Issue
Block a user