Skip to content

Manual - Build, Test, and Push #70

Manual - Build, Test, and Push

Manual - Build, Test, and Push #70

Workflow file for this run

on:
workflow_dispatch:
inputs:
branch:
description: "Branch to build off."
default: "main"
type: choice
options:
- main
- dev
- dev-rspm
product:
description: "The product/path to build."
required: true
type: choice
options:
- base-images
- connect
- connect-content-init
- content-images
- package-manager
- r-session-complete
- workbench
- workbench-for-google-cloud-workstations
- workbench-for-microsoft-azure-ml
type:
description: "The type of image being built."
required: false
default: "preview"
type: choice
options:
- preview
- daily
- release
version:
description: "The version to build. Use 'auto' to target the latest build."
required: false
default: "auto"
type: string
push:
description: "Flag to push the image after build."
required: false
default: false
type: boolean
name: Manual - Build, Test, and Push
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
concurrency:
group: bake-setup-${{ github.ref }}
cancel-in-progress: true
outputs:
GIT_SHA: ${{ steps.checkout.outputs.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get commit SHA
id: get-git-sha
run: |
GIT_SHA=$(git rev-parse --short HEAD)
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest-4x
name: manual-build
permissions:
contents: read
packages: write
env:
GIT_SHA: ${{ needs.setup.outputs.GIT_SHA }}
steps:
- name: Check Out Repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Set up Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: setup-buildx
with:
buildkitd-config: ./share/buildkitd.toml
- name: Get Version
id: get-version
run: |
if [[ "${{ inputs.version }}" == "auto" ]]; then
VERSION=`just -f ci.Justfile get-version ${{ inputs.product }} --type=${{ inputs.type }} --local`
else
VERSION="${{ inputs.version }}"
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build/Test/Scan/Push manual build image
uses: ./.github/actions/build-test-scan-push
with:
target: ${{ inputs.product }}
push-image: ${{ inputs.push }}
ghcr-token: ${{ secrets.GITHUB_TOKEN }}
dockerhub-username: ${{ secrets.DOCKER_HUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
gcp-json: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'