An open API service indexing awesome lists of open source software.

https://github.com/zarf-dev/setup-zarf

GitHub Action for Installing and Configuring Zarf
https://github.com/zarf-dev/setup-zarf

Last synced: 3 days ago
JSON representation

GitHub Action for Installing and Configuring Zarf

Awesome Lists containing this project

README

          

# GitHub Action to Install and Setup Zarf

Make [Zarf](https://github.com/zarf-dev/zarf) available to your GitHub Actions workflows.

This action will optionally download a Zarf init package. To learn more about Zarf init packages and their use-cases, see the [Zarf docs](https://docs.zarf.dev/ref/init-package/).

## Usage

```yaml
uses: zarf-dev/setup-zarf@v1.0.1
with:
version: # Optional. Defaults to latest.
download-init-package: true # Optional. Defaults to false.
```

## Example Package Create

```yaml
jobs:
create_pacakge:
runs-on: ubuntu-latest

name: Create my cool Zarf Package
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install Zarf
uses: zarf-dev/setup-zarf@v1.0.1
with:
version: v0.49.1

- name: Create the package
run: zarf package create --confirm
```

## Complete example: package create, cluster init, package deploy

```yaml
jobs:
deploy_package:
runs-on: ubuntu-latest

name: Create & deploy my cool Zarf Package
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install Zarf
uses: zarf-dev/setup-zarf@v1.0.1
with:
version: v0.49.1
download-init-package: true

- name: Create the package
run: zarf package create --confirm

- name: Create a k3d cluster
run: |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster delete && k3d cluster create

- name: Initialize the cluster
run: zarf init --confirm

- name: Deploy the package
run: zarf deploy --confirm

- name: View the deployed package
run: zarf package list
```

#

## Inputs

### version

- Optional
- Default: latest release
- **_Note:_** Include the `v` in your version (e.g., `v0.24.3`)
- Check out the [Zarf releases page](https://github.com/zarf-dev/zarf/releases) to see available versions

### download-init-package

- Optional
- Default: `false`