-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusting the CI Check for Docker Build
- Loading branch information
Showing
1 changed file
with
68 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,73 +5,95 @@ on: | |
- cron: "0 0 */7 * *" # every 7 days | ||
push: | ||
branches: | ||
- main | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- main | ||
paths: | ||
- './Dockerfile' | ||
- "./Dockerfile" | ||
jobs: | ||
ci-check: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: true | ||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: false | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4.1.1 | ||
# Add steps for CI checks of the Dockerfile | ||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Build RMG-Py | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
context: . | ||
file: ./devtools/Dockerfile_rmgpy | ||
push: false | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rmgpy:latest | ||
- name: Build T3 | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: false | ||
|
||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/thetandemtool-t3:latest | ||
|
||
build-and-push: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: true | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: false | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build and push RMG-Py | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./devtools/Dockerfile_rmgpy | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rmgpy:latest | ||
- name: Build and push T3 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/thetandemtool-t3:latest | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: true | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: false | ||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Build and push RMG-Py | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./devtools/Dockerfile_rmgpy | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/rmgpy:latest | ||
- name: Build and push T3 | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/thetandemtool-t3:latest |