-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.22 KB
/
publish_main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish Image Using Sha and Timestamp
on:
workflow_run:
workflows: [ "Test and build backend" ]
types:
- completed
jobs:
push:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.name == 'Test and build backend' && github.event.workflow_run.head_branch == 'main' }}
name: Publish Image using commit sha and timestamp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Push backend image on the registry
uses: Ferlab-Ste-Justine/action-push-image@v2
with:
username: ${{ secrets.FERLAB_DOCKER_HUB_USER }}
password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }}
image: ferlabcrsj/radiant-api
tag_format: "{sha}-{timestamp}"
location: ./backend
dockerfile: ./backend/Dockerfile
- name: Push frontend image on the registry
uses: Ferlab-Ste-Justine/action-push-image@v2
with:
username: ${{ secrets.FERLAB_DOCKER_HUB_USER }}
password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }}
image: ferlabcrsj/radiant-portal
tag_format: "{sha}-{timestamp}"
location: ./frontend
dockerfile: ./frontend/Dockerfile.radiant