Skip to content

Add credential vault commands and preview CLI binaries #7

Add credential vault commands and preview CLI binaries

Add credential vault commands and preview CLI binaries #7

Workflow file for this run

name: Preview CLI binaries
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: false
- name: Preview SDK read token
id: sdk-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.ADMIN_APP_ID }}
private-key: ${{ secrets.ADMIN_APP_PRIVATE_KEY }}
repositories: kernel-go-sdk-staging
permission-contents: read
- name: Download dependencies
env:
GOPRIVATE: github.com/kernel/kernel-go-sdk-staging
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ steps.sdk-token.outputs.token }}@github.com/.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/
run: go mod download
- name: Build preview archives
run: bash scripts/build-preview.sh
- uses: actions/upload-artifact@v4
with:
name: kernel-preview-${{ github.event.pull_request.head.sha || github.sha }}
path: dist/preview/*
if-no-files-found: error
retention-days: 14