mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-01 05:00:21 +11:00
94 lines
2.8 KiB
Markdown
94 lines
2.8 KiB
Markdown

|
|
|
|
[](https://github.com/dagger/dagger-for-github/releases/latest)
|
|
[](https://github.com/marketplace/actions/dagger-for-github)
|
|
[](https://github.com/dagger/dagger-for-github/actions?workflow=test)
|
|
[](https://codecov.io/gh/dagger/dagger-for-github)
|
|
|
|
## About
|
|
|
|
GitHub Action for [Dagger](https://dagger.io), a programmable deployment system.
|
|
|
|

|
|
|
|
___
|
|
|
|
* [Usage](#usage)
|
|
* [Basic](#basic)
|
|
* [Install Only](#install-only)
|
|
* [Customizing](#customizing)
|
|
* [inputs](#inputs)
|
|
* [License](#license)
|
|
|
|
## Usage
|
|
|
|
### Basic
|
|
|
|
```yaml
|
|
name: dagger
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Dagger
|
|
uses: dagger/dagger-for-github@v1
|
|
with:
|
|
age-key: ${{ secrets.DAGGER_AGE_KEY }}
|
|
args: up
|
|
```
|
|
|
|
### Install Only
|
|
|
|
```yaml
|
|
steps:
|
|
-
|
|
name: Install Dagger
|
|
uses: dagger/dagger-for-github@v1
|
|
with:
|
|
install-only: true
|
|
-
|
|
name: Show Dagger version
|
|
run: dagger version
|
|
```
|
|
|
|
## Customizing
|
|
|
|
### inputs
|
|
|
|
Following inputs can be used as `step.with` keys
|
|
|
|
| Name | Type | Default | Description |
|
|
|------------------|---------|--------------|------------------------------------------------------------------|
|
|
| `version` | String | `latest` | Dagger version |
|
|
| `age-key` | String | | Dagger private key |
|
|
| `args` | String | | Arguments to pass to Dagger |
|
|
| `workdir` | String | `.` | Working directory (below repository root) |
|
|
| `install-only` | Bool | `false` | Just install Dagger |
|
|
| `cleanup` | Bool | `true` | Cleanup Dagger home folder at the end of a job |
|
|
|
|
## Development
|
|
|
|
```shell
|
|
# format code and build javascript artifacts
|
|
docker buildx bake pre-checkin
|
|
|
|
# validate all code has correctly formatted and built
|
|
docker buildx bake validate
|
|
|
|
# run tests
|
|
docker buildx bake test
|
|
```
|
|
|
|
## License
|
|
|
|
MIT. See `LICENSE` for more details.
|