create daily docker image on develop #600
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create daily docker image on develop | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * *" | |
jobs: | |
publish-docker-develop-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: develop | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the openimis backend Docker image | |
run: | | |
LABEL=develop | |
docker build . --tag ghcr.io/openimis/openimis-be:${LABEL} | |
docker run ghcr.io/openimis/openimis-be:${LABEL} | |
docker push ghcr.io/openimis/openimis-be:${LABEL} |