Update docker-publish.yml #3
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: main | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-publish-db: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' # Running this job only for develop branch | |
steps: | |
- uses: actions/checkout@v2 # Checking out the repo | |
- name: Build and publish Docker Image to GitHub Container Registry | |
uses: TCPShield/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages | |
image-name: rinha-backend-postgres # Provide Docker image name | |
build-context: ./config/db # Provide path to the folder with the Dockerfile | |
build-and-publish-golang: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' # Running this job only for develop branch | |
steps: | |
- uses: actions/checkout@v2 # Checking out the repo | |
- name: Build and Publish head Docker image | |
uses: TCPShield/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages | |
image-name: rinha-backend # Provide Docker image name | |