Create release.yml #3
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: Docker Build with Random Data | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-run-random-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker Image with Random Data | |
run: | | |
docker build -t cogstacksystems/cogstackcohort-randomdata:latest --build-arg random=true . | |
docker build -t cogstacksystems/cogstackcohort:latest --build-arg random=false . | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push to DockerHub | |
env: | |
IMAGE_TAG: ${{ env.RELEASE_VERSION }} | |
run: | | |
docker push cogstacksystems/cogstackcohort-randomdata:latest | |
docker push cogstacksystems/cogstackcohort:latest |