Merge pull request #97 from khalilahmad1547/dependabot/npm_and_yarn/c… #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy Docker Image | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: check docker | |
run: docker -v | |
- name: Build the Docker image | |
run: docker compose --file ./docker-compose.yml build | |
- name: Login to DockerHub | |
run: | | |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Publish to DockerHub | |
run: docker compose --file ./docker-compose.yml push |