-
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.
Create build_and_push.yaml for testing github actions
- Loading branch information
1 parent
25e3169
commit 7cc9a84
Showing
1 changed file
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#READ THIS: | ||
#this file is on main only to test github actions. it is a WIP | ||
|
||
name: Build And Push | ||
on: | ||
# push: | ||
# branches: | ||
# - 'main' | ||
# paths: | ||
# - Dockerfile | ||
workflow_dispatch | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PW }} | ||
|
||
- name: Set up QEMU #might not be needed | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Check Out | ||
uses: actions/checkout@v4 | ||
- run: echo "🏃➡️ ${{ github.repository }} has been cloned to ${{ runner.name }}" | ||
|
||
- 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=openvdb${{ env.DATETIME }}" >> $GITHUB_ENV | ||
|
||
- name: Build and Push to Dockerhub | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: ${{ env.IMAGE_TAG }} #user/app:latest |