Rabbitmq drab volcano #14
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
name: Docker | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
pull_request: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Disk Usage 1 | |
run: | | |
df -h | |
#- name: Free Disk Space (Ubuntu) | |
# uses: jlumbroso/free-disk-space@main | |
# with: | |
# tool-cache: true | |
# android: true | |
# dotnet: true | |
# haskell: true | |
# large-packages: true | |
# docker-images: true | |
# swap-storage: true | |
# | |
#- name: Disk Usage 2 | |
# run: | | |
# df -h | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
submodules: false # this fails | |
#- name: checkout submodules | |
# run: | | |
# /usr/bin/git submodule sync | |
# /usr/bin/git -c protocol.version=2 submodule update --init --force | |
# | |
#- name: download checkpoints | |
# run: | | |
# curl -o checkpoints.tgz https://criticalmaas.ncsa.illinois.edu/checkpoints.tgz | |
# tar xf checkpoints.tgz | |
#- name: Disk Usage 3 | |
# run: | | |
# df -h | |
# create metadata for image | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ncsa/criticalmaas-pipeline | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
# setup docker build | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set Up contained image store | |
shell: bash | |
run: | | |
cat /etc/docker/daemon.json | |
cat /etc/docker/daemon.json | jq '. | .+{"data-root": "/mnt/docker-data"}' | sudo tee /etc/docker/daemon.json | |
cat /etc/docker/daemon.json | |
sudo systemctl restart docker | |
docker info | |
- name: Inspect Builder | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
# login to registries | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - name: Login to GitHub Container Registry | |
# uses: docker/login-action@v3 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Disk Usage 4 | |
run: | | |
df -h | |
# build the docker images | |
#- name: Build and push uiuc pipeline | |
# uses: docker/build-push-action@v5 | |
# with: | |
# context: . | |
# push: ${{ github.event_name != 'pull_request' }} | |
# platforms: linux/amd64 | |
# cache-from: type=registry,ref=ncsa/criticalmaas-pipeline:buildcache | |
# cache-to: type=registry,ref=ncsa/criticalmaas-pipeline:buildcache,mode=max | |
# tags: ${{ steps.meta.outputs.tags }} | |
# labels: ${{ steps.meta.outputs.labels }} |