-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dockerhub_action_testing'
- Loading branch information
Showing
4 changed files
with
74 additions
and
6 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
push: | ||
branches: | ||
- 'main' | ||
|
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 |
---|---|---|
@@ -1,13 +1,47 @@ | ||
name: Build and Push | ||
#READ THIS: | ||
#this file is on main only to test github actions. it is a WIP | ||
|
||
name: Build And Push | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - 'main' | ||
# paths: | ||
# - Dockerfile | ||
workflow_dispatch | ||
|
||
jobs: | ||
dummy: | ||
docker: | ||
runs-on: ubuntu-latest | ||
environment: docker_jbbp | ||
steps: | ||
- name: Echo Info | ||
run: echo "This is an empty actions file. It was created on main to reveal Build and Push files on other branches. To test this action, please run it on whatever branch holds your draft." | ||
|
||
- name: Verify Secrets | ||
run: echo "Username is set to \${{ secrets.DOCKERHUB_USERNAME }}" | ||
run: echo "Username is set to ${{ secrets.DOCKERHUB_USERNAME }}" | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Set up QEMU #might not be needed | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
env: | ||
DATETIME: "$(date +'%Y%m%d%H%M%S')" | ||
- name: Set Image Tag #TODO get rid of this echo hack, put it directly in the variable | ||
run: echo "IMAGE_TAG=joachimbbp/openvdb:openvdb_${{ env.DATETIME }}" >> $GITHUB_ENV | ||
|
||
- name: Build and Push to Dockerhub | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.IMAGE_TAG }} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build Only | ||
on: workflow_dispatch | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🐋 Dockerfile change detected by a ${{ github.event_name }} event!" | ||
- run: echo "🧪 This job, running on ${{ runner.os }}, will test to see if the dockerfile can successfully build an image" | ||
- run: echo "🌳 This is running on the ${{ github.ref }} branch of ${{ github.repository }}" | ||
|
||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
- run: echo "🏃➡️ ${{ github.repository }} has been cloned to ${{ runner.name }}" | ||
|
||
- run: echo "🏗️ Setting up Docker Buildx..." | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
env: | ||
DATETIME: "$(date +'%Y%m%d%H%M%S')" | ||
- name: Set Image Tag #TODO get rid of this echo hack, put it directly in the variable | ||
run: echo "IMAGE_TAG=openvdb${{ env.DATETIME }}" >> $GITHUB_ENV | ||
|
||
|
||
- run: echo "🚜 Building docker image ${{ env.IMAGE_TAG }}" | ||
- name: Build Docker Image | ||
run: docker build -t "${{ env.IMAGE_TAG }}" . | ||
|
||
- run: echo "🏁 all steps complete" |
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