https://github.com/bytebase/login-action
GitHub action to login the Bytebase server
https://github.com/bytebase/login-action
bytebase
Last synced: 10 months ago
JSON representation
GitHub action to login the Bytebase server
- Host: GitHub
- URL: https://github.com/bytebase/login-action
- Owner: bytebase
- License: mit
- Created: 2024-11-11T06:34:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T08:14:03.000Z (about 1 year ago)
- Last Synced: 2025-02-25T17:49:56.290Z (11 months ago)
- Topics: bytebase
- Language: Shell
- Homepage: https://github.com/marketplace/actions/bytebase-login
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bytebase Login Action
Use this action to log in to your Bytebase server in the GitHub CI.
## Inputs
| Name | Description | Required | Default |
|----------------|-------------------------------------------------------------|----------|---------|
| `bytebase-url` | The Bytebase instance URL, should be the Bytebase external URL | true | |
| `api-version` | Bytebase API version | false | `v1` |
| `service-key` | The Bytebase service account key | true | |
| `service-secret`| The Bytebase service account secret | true | |
## Outputs
| Name | Description |
|-----------|------------------------------------------------------|
| `token` | The API token obtained from bytebase/login action |
| `api_url` | The Bytebase API URL with version |
## Usage Example
```yml
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
jobs:
bytebase-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login Bytebase
id: bytebase-login
uses: bytebase/login-action@v1
with:
bytebase-url: ${{ secrets.BYTEBASE_URL }}
service-key: ${{ secrets.BYTEBASE_SERVICE_KEY }}
service-secret: ${{ secrets.BYTEBASE_SERVICE_SECRET }}
- name: List projects
run: |
curl "${{ steps.bytebase-login.outputs.api_url }}/projects" \
-H 'Authorization: Bearer ${{ steps.bytebase-login.outputs.token }}' \
-H 'Content-Type: application/json; charset=utf-8'
```