Skip to content

Commit

Permalink
Merge pull request #54 from CIROH-UA/manual-build
Browse files Browse the repository at this point in the history
Create build_branch.yaml
  • Loading branch information
benlee0423 committed Jun 6, 2024
2 parents 2eecbcd + b1195b5 commit aafbeab
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-and-push:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/build_branch.yaml
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

0 comments on commit aafbeab

Please sign in to comment.