Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishitbaria authored Jun 25, 2024
1 parent 337ec4f commit 6c0990c
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker Compose Actions
on:
push:
branches:
- "main"
- 'main'

jobs:
docker-compose:
Expand All @@ -16,10 +16,23 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u nishitbaria --password-stdin

- name: Run Docker Compose
run: docker-compose -f compose.yml up --build -d
- name: Set up Docker Compose
run: |
docker-compose -f compose.yml up --build -d
- name: Push to Docker Hub
run: docker-compose -f compose.yml push
- name: Tag Docker Image
run: |
IMAGE_NAME=nishitbaria/opengrame
IMAGE_TAG=latest
docker tag ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${GITHUB_SHA}
- name: Push Docker Image
run: |
IMAGE_NAME=nishitbaria/opengrame
IMAGE_TAG=latest
docker push ${IMAGE_NAME}:${IMAGE_TAG}
docker push ${IMAGE_NAME}:${GITHUB_SHA}

0 comments on commit 6c0990c

Please sign in to comment.