Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
trying new docker commands
  • Loading branch information
nirlipo authored Aug 27, 2024
1 parent d0bbb5e commit ddc8e21
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,20 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: nirlipo/planimation_backend

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

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: server
file: docker/release/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: login to docker hub
id: docker-hub
env:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
run: |
docker login -u $username -p $password
- name: build the docker image
id: build-docker-image
run: |
ls -la
docker build . -f server/docker/release/Dockerfile -t nirlipo/planimation_backend:latest
- name: push the docker image
id: push-docker-image
run: docker push ${{secrets.DOCKERHUB_USERNAME}}/planimation_backend:latest

0 comments on commit ddc8e21

Please sign in to comment.