added badges #6
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 and Push Forum Docker Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Build Docker image | |
run: | | |
cd forum_service && docker build . --tag forum_service:latest | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Docker image to GitHub Container Registry | |
run: | | |
docker tag forum_service:latest ghcr.io/tomdieu/agro-help-microservices/forum_service:latest | |
docker push ghcr.io/tomdieu/agro-help-microservices/forum_service:latest |