Skip to content

Publish Image Using Sha and Timestamp #160

Publish Image Using Sha and Timestamp

Publish Image Using Sha and Timestamp #160

Workflow file for this run

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