mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-01 13:10:18 +11:00
Since we published https://github.com/dagger/dagger/releases/tag/v0.3.6 (Nov. 30, 2022), this action started downloading that version (i.e. `latest`), which resulted in breakage, as described in the issue that this fixes. As soon as all tests pass and this gets the OK + merge, we should: 1. Cut a new release for this action (I am thinking v3.2.0) 2. Update the v3 tag to point to this new version That should fix this for all existing GitHub Actions users without any intervention on their part. Fixes https://github.com/dagger/dagger-for-github/issues/80 Signed-off-by: Gerhard Lazu <gerhard@dagger.io>
113 lines
3 KiB
Markdown
113 lines
3 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)
|
|
* [Multiple commands](#multiple-commands)
|
|
* [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@v3
|
|
-
|
|
name: Dagger
|
|
uses: dagger/dagger-for-github@v3
|
|
with:
|
|
cmds: do test
|
|
```
|
|
|
|
### Install Only
|
|
|
|
```yaml
|
|
steps:
|
|
-
|
|
name: Install Dagger
|
|
uses: dagger/dagger-for-github@v3
|
|
with:
|
|
install-only: true
|
|
-
|
|
name: Show Dagger version
|
|
run: dagger version
|
|
```
|
|
|
|
### Multiple commands
|
|
|
|
```yaml
|
|
steps:
|
|
-
|
|
name: Dagger
|
|
uses: dagger/dagger-for-github@v3
|
|
with:
|
|
cmds: |
|
|
project update
|
|
do test
|
|
```
|
|
|
|
## Customizing
|
|
|
|
### inputs
|
|
|
|
Following inputs can be used as `step.with` keys
|
|
|
|
> `List` type is a newline-delimited string
|
|
> ```yaml
|
|
> cmds: |
|
|
> project update
|
|
> do test
|
|
> ```
|
|
|
|
| Name | Type | Default | Description |
|
|
|----------------|--------|---------|----------------------------------------------------------------------------------------|
|
|
| `version` | String | `0.2` | Dagger version (e.g., `0.2.36`, `latest`, `https://github.com/dagger/dagger.git#main`) |
|
|
| `cmds` | List | | List of Dagger commands |
|
|
| `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
|
|
|
|
Apache-2.0 License. See `LICENSE` for more details.
|