Skip to content

Update docker-publish.yml #7

Update docker-publish.yml

Update docker-publish.yml #7

name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: login to docker hub
id: docker-hub

Check failure on line 16 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
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