Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

🚸 automatically use GitHub token #323

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
cache: npm
- run: npm ci
- run: npm run all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# test action works running from the graph
test:
Expand All @@ -42,8 +40,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ./
id: z3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "${{ steps.z3.outputs.z3-root }}"
- run: '[ -d "${{ steps.z3.outputs.z3-root }}" ] || exit 1'
- if: runner.os != 'Windows'
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@ To download the latest version of Z3 for the host platform and add it to the `PA
- name: Setup Z3
id: z3
uses: cda-tum/setup-z3@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

This action creates a `z3-root` output variable that contains the path to the root directory of the Z3 installation and exports the `Z3_ROOT` environment variable for subsequent steps in a job. The output variable can be accessed as `${{ steps.z3.outputs.z3-root }}`.

> **Warning**
> The `GITHUB_TOKEN` environment variable is required to download the Z3 binaries from GitHub releases.
> The token is automatically provided by GitHub Actions and does not need to be configured manually.

### Specifying a version

In many cases, it is convenient to use a specific version of Z3. This can be done by specifying the `version` input:
Expand All @@ -30,8 +24,6 @@ In many cases, it is convenient to use a specific version of Z3. This can be don
uses: cda-tum/setup-z3@v1
with:
version: 4.11.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

> **Note**
Expand All @@ -48,8 +40,6 @@ If you want to explicitly specify the platform and architecture for which Z3 sho
with:
platform: macOS
architecture: arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

> **Note**
Expand All @@ -70,6 +60,4 @@ By default, the action only adds Z3 into `PATH`, meaning it cannot be used as a
uses: cda-tum/setup-z3@v1
with:
add_to_library_path: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: "Add Z3 to the library path variables, such that it can be used as a static/dynamic library. Defaults to false."
required: false
default: "false"
token:
description: "The token that the action will use to query the GitHub API. Defaults to the repository's GitHub token."
required: false
default: ${{ github.token }}
outputs:
z3-root:
description: "The root directory of the Z3 installation"
Expand Down
Loading