generated from 2i2c-org/hub-user-image-template
-
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.
Merge pull request #54 from CIROH-UA/manual-build
Create build_branch.yaml
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push: | ||
|
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 @@ | ||
name: Branch Build and push container image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Exit if main branch | ||
shell: bash | ||
run: | | ||
echo "This is main branch, exiting... Use the other workflow." | ||
exit 1 | ||
if: startsWith(github.ref, 'refs/heads/main') | ||
- name: cleanup disk space | ||
run: | | ||
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc | ||
df -h | ||
- name: Set tag name | ||
shell: bash | ||
run: | | ||
echo "TAG_NAME=${GITHUB_REF##*/}" >> "$GITHUB_ENV" | ||
if: ${{ !startsWith(github.ref, 'refs/heads/main') }} | ||
|
||
- name: Checkout files in repo | ||
uses: actions/checkout@main | ||
|
||
- name: Build and push the image to quay.io | ||
uses: jupyterhub/repo2docker-action@master | ||
with: | ||
# Make sure username & password/token pair matches your registry credentials | ||
DOCKER_USERNAME: ${{ secrets.QUAY_CIROH_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.QUAY_CIROH_PASSWORD }} | ||
DOCKER_REGISTRY: "quay.io" | ||
IMAGE_NAME: "awiciroh/devcon24" | ||
ADDITIONAL_TAG: ${{ env.TAG_NAME}} | ||
|
||
# Lets us monitor disks getting full as images get bigger over time | ||
- name: Show how much disk space is left | ||
run: df -h |