Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build_branch.yaml #54

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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