Skip to content

Release scripts for github #2

Release scripts for github

Release scripts for github #2

name: Build ppc64le image
on: [ push, pull_request ]
jobs:
build-ppc64le-image:
runs-on: ubuntu-22.04
timeout-minutes: 90
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# For multiplatform use list like:
# "linux/amd64,linux/arm64"
PLATFORMS: "linux/ppc64le"
GIT_COMMIT: ${{ github.sha }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Enable emulation
run: |
sudo apt-get update
sudo apt-get install -y \
qemu qemu-user-static
sudo update-binfmts --display
echo "ℹ️ podman"
podman version
echo "ℹ️ buildah"
buildah version
echo "ℹ️ skopeo"
skopeo -v
- name: Get Current Date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Prepare Suffix
id: suffix
if: ${{ github.event.inputs.tag != '' }}
run: echo suffix="-${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
- name: Prepare Tags
id: prep
run: |
DOCKER_BASE_IMAGE=noobaa/noobaa-base
DOCKER_BUILDER_IMAGE=noobaa/noobaa-builder
DOCKER_CORE_IMAGE=noobaa/noobaa-core
VERSION="${{ steps.date.outputs.date }}"
echo "::warning ${VERSION}"
BASE_TAGS="${DOCKER_BASE_IMAGE}:${{ github.event.inputs.branch }}-${VERSION}${{ steps.suffix.outputs.suffix }}"
BUILDER_TAGS="${DOCKER_BUILDER_IMAGE}:${{ github.event.inputs.branch }}-${VERSION}${{ steps.suffix.outputs.suffix }}"
CORE_TAGS="${DOCKER_CORE_IMAGE}:${{ github.event.inputs.branch }}-${VERSION}${{ steps.suffix.outputs.suffix }}"
CORE_OCS_DEV_TAG="ocs-dev/noobaa-core:${{ github.event.inputs.branch }}-latest"
echo "::warning ${CORE_TAGS}"
echo "basetags=${BASE_TAGS}" >> $GITHUB_OUTPUT
echo "buildertags=${BUILDER_TAGS}" >> $GITHUB_OUTPUT
echo "coretags=${CORE_TAGS}" >> $GITHUB_OUTPUT
echo "ocsdevlatest=${CORE_OCS_DEV_TAG}" >> $GITHUB_OUTPUT
- name: Build Builder Images
run: |
buildah build \
-f src/deploy/NVA_build/builder.Dockerfile \
--platform=$PLATFORMS \
--manifest localhost/noobaa-builder
#echo "ℹ️ Inspect noobaa-builder manifest"
#skopeo inspect --raw containers-storage:localhost/noobaa-builder
- name: Build Base Images
run: |
buildah build \
-f src/deploy/NVA_build/Base.Dockerfile \
--platform=$PLATFORMS \
--manifest localhost/noobaa-base
#echo "ℹ️ Inspect noobaa-base manifest"
#skopeo inspect --raw containers-storage:localhost/noobaa-base
- name: Build NooBaa Images
run: |
buildah build \
-f src/deploy/NVA_build/NooBaa.Dockerfile \
--build-arg GIT_COMMIT=$GIT_COMMIT \
--platform=$PLATFORMS \
--manifest localhost/noobaa
#echo "ℹ️ Inspect noobaa manifest"
#skopeo inspect --raw containers-storage:localhost/noobaa