Skip to content

Support OpenAI API token for AI Assistant #181

Support OpenAI API token for AI Assistant

Support OpenAI API token for AI Assistant #181

Workflow file for this run

name: Branch and PR build
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || 'branch' }} # scope to for the current workflow
cancel-in-progress: ${{ github.event_name == 'pull_request' }} # cancel only PR related jobs
env:
GOLANGCI_LINT_TIMEOUT: 5m
GORELEASER_CURRENT_TAG: "v0.0.0-latest"
BUCKET_NAME: botkube-cloud-plugins-latest
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
# When the files to be extracted are already present,
# tar extraction in Golangci Lint fails with the "File exists"
# errors. These files appear to be present because of
# cache in setup-go, on disabling the cache we are no more seeing
# such error. Cache is to be enabled once the fix is available for
# this issue:
# https://github.com/golangci/golangci-lint-action/issues/807
cache: false
- name: "Check code quality"
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=${{ env.GOLANGCI_LINT_TIMEOUT }}
test:
name: Test code
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: 'true'
- name: "Run tests"
run: make test
build-plugins:
name: Build plugins without publish
runs-on: ubuntu-latest
timeout-minutes: 60
if: github.event_name == 'pull_request'
needs: [lint, test]
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
version: latest
- name: Build plugins and generate plugins index.yaml
env:
PLUGIN_DOWNLOAD_URL_BASE_PATH: ""
run: |
make build-plugins-archives
USE_ARCHIVE=true make gen-plugin-index