GitHub action: splitting the workflow file in two parts to avoid runn… #29
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: Build | |
on: | |
# trigger on pushes | |
push: | |
branches: [ main ] | |
# trigger on PRs | |
pull_request: | |
branches: main | |
# trigger weekly, as far as tensorflow:latest-gpu is used | |
schedule: | |
- cron: '5 9 * * SAT' | |
jobs: | |
push_tensorflow_image: | |
name: Push to DockerHub (TensorFlow) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push to DockerHub | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: lnstadrum/fastaugment_tf:latest | |
file: ./tensorflow.Dockerfile | |
push_pytorch_image: | |
name: Push to DockerHub (PyTorch) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push to DockerHub | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: lnstadrum/fastaugment_torch:latest | |
file: ./pytorch.Dockerfile |