Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,27 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag tanutapi/simple-meteor-chat:latest
- name: Push to Docker Hub
run: docker push tanutapi/simple-meteor-chat:latest


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

# Credentials are only available on push events, so pull requests
# build the image without logging in or pushing it.
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
tanutapi/simple-meteor-chat:latest
tanutapi/simple-meteor-chat:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading