Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeancrodrigues authored Aug 23, 2023
1 parent 295dd71 commit 27f584a
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: main

on:
Expand All @@ -7,16 +8,30 @@ on:
branches: [ main ]

jobs:
builddb:
runs-on: ubuntu-20.04
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@master
- name: Build
run: docker build ./config/db -t rinha-backend-postgres:latest
build:
runs-on: ubuntu-20.04
- uses: actions/checkout@v2 # Checking out the repo

- name: Build and Publish head Docker image
uses: VaultVulp/[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@master
- name: Build
run: docker build . -t rinha-backend:latest

- uses: actions/checkout@v2 # Checking out the repo

- name: Build and Publish head Docker image
uses: VaultVulp/[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

0 comments on commit 27f584a

Please sign in to comment.