Skip to content

Commit

Permalink
Merge pull request #63 from vicheanath/docker-setup
Browse files Browse the repository at this point in the history
fix: context
  • Loading branch information
vicheanath authored Feb 8, 2024
2 parents 23bf270 + f260cd0 commit b7d29a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
context: ./backend/pms
file: ./backend/pms/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,3 @@ jobs:

- name: Build with Maven
run: cd backend/pms && mvn clean package

- name: Build with Maven
run: cd backend/pms && mvn clean package

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/mini-pms
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./backend/pms
file: ./backend/pms/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b7d29a0

Please sign in to comment.