-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (35 loc) · 1.48 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and push container image
on:
push:
branches:
- main
pull_request:
jobs:
test-build:
runs-on: ubuntu-latest
steps:
# For biggish images, github actions runs out of disk space.
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104
# This gives us a total of about 52G of free space, which should be enough for now
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- name: Set Environment Variables
run: |
echo "DATE_TAG=$(TZ='America/Seattle' date +'%Y.%m.%d')" >> "$GITHUB_ENV"
- name: Checkout files in repo
uses: actions/checkout@main
- name: Build and push the image to quay.io ${{ matrix.environment }}
uses: jupyterhub/repo2docker-action@master
with:
# Make sure username & password/token pair matches your registry credentials
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKER_REGISTRY: "quay.io"
ADDITIONAL_TAG: ${{ env.DATE_TAG }}
# Disable pushing a 'latest' tag, as this often just causes confusion
# LATEST_TAG_OFF: true
IMAGE_NAME: "carbonplan/aglime-swap-cdr"