Skip to content

Commit

Permalink
deploy: beta phase
Browse files Browse the repository at this point in the history
  • Loading branch information
h4l-yup committed Apr 19, 2023
1 parent 9883f71 commit d44974c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/docker-beta-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Docker Beta Image CI

on:
push:
tags:
- "**-beta"

jobs:
api-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Docker meta
id: api-meta
uses: docker/metadata-action@v4
with:
images: line/abc-user-feedback-api
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push API
uses: docker/build-push-action@v4
with:
context: .
file: ./apps/api/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.api-meta.outputs.tags }}
labels: ${{ steps.api-meta.outputs.labels }}

web-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Docker meta
id: web-meta
uses: docker/metadata-action@v4
with:
images: line/abc-user-feedback-web
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Web
uses: docker/build-push-action@v4
with:
context: .
file: ./apps/web/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.web-meta.outputs.tags }}
labels: ${{ steps.web-meta.outputs.labels }}
1 change: 1 addition & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "*"
- "!**-beta"

jobs:
api-build:
Expand Down

0 comments on commit d44974c

Please sign in to comment.