-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
00a4d7d
ae9b8ad
b0fe08e
db1b531
4771c4d
36cc4c4
1312cfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Test setup-adc | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| test-latest: | ||
| name: Test latest version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup ADC (latest) | ||
| uses: ./ | ||
| id: setup | ||
|
|
||
| - name: Verify installation | ||
| run: | | ||
| adc --version | ||
| echo "Installed version: ${{ steps.setup.outputs.adc-version }}" | ||
|
|
||
| test-specific-version: | ||
| name: Test specific version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup ADC (v0.24.0) | ||
| uses: ./ | ||
| with: | ||
| version: 0.24.0 | ||
|
|
||
| - name: Verify version | ||
| run: adc --version | grep -F 0.24.0 | ||
|
|
||
| test-arm64: | ||
| name: Test ARM64 | ||
| runs-on: ubuntu-24.04-arm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup ADC (ARM64) | ||
| uses: ./ | ||
| id: setup | ||
|
|
||
| - name: Verify installation | ||
| run: | | ||
| adc --version | ||
| echo "Installed version: ${{ steps.setup.outputs.adc-version }}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| node_modules/ | ||
| *.tsbuildinfo |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /dist | ||
| /coverage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "trailingComma": "all", | ||
| "tabWidth": 2, | ||
| "semi": true, | ||
| "plugins": [ | ||
| "@trivago/prettier-plugin-sort-imports" | ||
| ], | ||
| "importOrder": [ | ||
| "^[./]" | ||
| ], | ||
| "importOrderParserPlugins": [ | ||
| "typescript", | ||
| "decorators-legacy" | ||
| ], | ||
| "importOrderSeparation": true, | ||
| "importOrderSortSpecifiers": true, | ||
| "endOfLine": "lf", | ||
| "printWidth": 80 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "editor.formatOnSave": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Setup ADC | ||
|
|
||
| This action sets up the [api7/adc](https://github.com/api7/adc) CLI tool for use in GitHub Actions workflows. | ||
|
|
||
| ## Usage | ||
|
|
||
| > **Security:** Pin your workflow to a specific [release tag](https://github.com/api7/setup-adc/releases) | ||
| > (e.g. `@v1`) or, for maximum immutability, a full commit SHA | ||
| > (e.g. `@a824008085750b8e136effc585c3cd6082bd575f`). Using `@main` | ||
| > is convenient for development but may introduce breaking changes unexpectedly. | ||
|
|
||
| <!-- x-release-please-start-version --> | ||
| ```yaml | ||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: api7/setup-adc@v1 | ||
| id: setup | ||
| with: | ||
| version: 0.25.0 # optional, defaults to latest | ||
|
|
||
|
bzp2010 marked this conversation as resolved.
|
||
| - run: adc --version | ||
| - run: adc ping | ||
| ``` | ||
| <!-- x-release-please-end --> | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Input | Description | Required | Default | | ||
| | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------- | | ||
| | `version` | Version of ADC to install (e.g. `0.25.0`, `latest`) | No | `latest` | | ||
| | `token` | GitHub token for API requests. Typically not supplied by the user — the default is sufficient on github.com. On GHES, pass a PAT if rate limited. | No | `${{ github.server_url == 'https://github.com' && github.token | | '' }}` | | ||
|
|
||
|
bzp2010 marked this conversation as resolved.
bzp2010 marked this conversation as resolved.
Comment on lines
+28
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify whether action.yml exposes a `token` input and whether it is required.
fd -i '^action\.yml$' -X sed -n '1,220p'Repository: api7/setup-adc Length of output: 680 Add The 🤖 Prompt for AI Agents |
||
| ## Outputs | ||
|
|
||
| | Output | Description | | ||
| | ------------- | ------------------------- | | ||
| | `adc-version` | The installed ADC version | | ||
|
|
||
|
bzp2010 marked this conversation as resolved.
|
||
| ## License | ||
|
|
||
| Apache-2.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: "Setup ADC" | ||
| description: "Setup the API7 ADC CLI tool" | ||
| author: "API7" | ||
| branding: | ||
| icon: "terminal" | ||
| color: "blue" | ||
| inputs: | ||
| version: | ||
| description: > | ||
| Version of ADC to install. Examples: 0.25.0, v0.25.0. Defaults to the | ||
| latest available version when not specified. | ||
| default: "latest" | ||
| token: | ||
| description: > | ||
| Used to fetch the latest ADC release from the GitHub API. Since there is a | ||
| default, this is typically not supplied by the user. When running this | ||
| action on github.com, the default value is sufficient. When running on | ||
| GHES, you can pass a personal access token for github.com if you are | ||
| experiencing rate limiting. | ||
| default: ${{ github.server_url == 'https://github.com' && github.token || '' }} | ||
| outputs: | ||
| adc-version: | ||
| description: "The installed ADC version" | ||
| runs: | ||
| using: "node24" | ||
| main: "dist/index.js" |
Uh oh!
There was an error while loading. Please reload this page.