Skip to content

chore: Add workflow to publish autopilot-utils to PyPI #90

chore: Add workflow to publish autopilot-utils to PyPI

chore: Add workflow to publish autopilot-utils to PyPI #90

Workflow file for this run

name: Build all
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Build
run: |
bazel build //...
- name: Test
run: |
bazel test //...
####
## only on push to main
####
- name: Log in to the Container registry
if: github.event_name == 'push'
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the core image to the OCI registry
if: github.event_name == 'push'
#run: bazel run --embed_label="${GITHUB_SHA::6}" --stamp //core-image:push-image
run: bazel run //core-image:push-image
- name: Push the chart to the OCI registry
if: github.event_name == 'push'
run: bazel run //chart:yaku_helm.push_registry