GitHub Action to get the required Dagger version
This action gets the engineVersion field from the dagger.json file of a repository.
It supports workflows with and without checking out the repository first:
- If the repository is with a
dagger.jsonfile is present, the action will get theengineVersionfield from it - If there is no checked out repository, the action will use the Contents API to get the
dagger.jsonfile
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
ci:
name: CI
runs-on: depot-ubuntu-latest-16
steps:
# Optional
- name: Checkout repository
uses: actions/checkout
- name: Get Dagger version
id: dagger_version
uses: sagikazarmark/dagger-version-action
with: # optional section
path: 'some/directory'
- name: Run pipeline
uses: dagger/dagger-for-github
with:
verb: call
args: ci
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
version: ${{ steps.dagger_version.outputs.version }}The project is licensed under the MIT License.