Skip to content

Toolkit

Toolkit #313

Workflow file for this run

name: Toolkit
on:
workflow_dispatch: {}
schedule:
- cron: "50 1 * * *" # 1 AM UTC, 6 PM PST
jobs:
git:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SHA
id: sha
run: echo "sha=$(/usr/bin/git log -1 --format='%H')" >> $GITHUB_OUTPUT
outputs:
sha: ${{ steps.sha.outputs.sha }}
kaniko:
runs-on: ubuntu-latest
needs: [git]
container:
image: gcr.io/kaniko-project/executor:v1.23.2-debug
permissions:
contents: read # read the repository
steps:
- name: Build and Push Container
run: |
# Docker config provided by ecr.yaml workflow.
echo -n ${{ secrets.DOCKER_CONFIG_BASE64 }} | base64 -d > /kaniko/.docker/config.json
# Configure git credentials to access github private repositories.
export GIT_USERNAME='GITHUB_TOKEN'
export GIT_PASSWORD='${{ secrets.GITHUB_TOKEN }}'
# Build and push
/kaniko/executor --dockerfile=toolkit/Dockerfile \
--context='${{ github.repositoryUrl }}#${{ needs.git.outputs.sha }}' \
--destination=${{ vars.REGISTRY }}/holos-run/container-images/toolkit:latest \
--push-retry 5 \
--image-name-with-digest-file /workspace/image-digest.txt
# Make this an artifact?
cat /workspace/image-digest.txt