Skip to content

Commit

Permalink
try: new dockerhub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
n9mi committed Sep 11, 2024
1 parent 8b5e937 commit 3d00703
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,26 @@ jobs:
needs: [test]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
file: Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/contact-api:latest
- name: Login to Dockerhub
env:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
run: |
docker login -u $username -p $password
- name: Build the docker image
run: |
ls -la
docker build . -f Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/contact-api:latest
- name: Push the docker image
run: docker push ${{secrets.DOCKERHUB_USERNAME}}/contact-api:latest

0 comments on commit 3d00703

Please sign in to comment.