Skip to content

Commit

Permalink
Merge pull request #97 from mesoform/feat/SEC-147/docker_build_push
Browse files Browse the repository at this point in the history
Adds github action to build and push dev images
  • Loading branch information
danperezsan authored Jun 5, 2024
2 parents 0d1ab44 + b5b71f5 commit 7d2c937
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Push Dev Image

on:
push:
branches:
- 'dev-pg-v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract branch name
id: extract_branch
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: mesoform/postgres-ha:${{ env.BRANCH_NAME }}

0 comments on commit 7d2c937

Please sign in to comment.