Skip to content

ci(dagger): trim new lines from git info (#250) #132

ci(dagger): trim new lines from git info (#250)

ci(dagger): trim new lines from git info (#250) #132

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
cache: true
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: tests --src-dir .
version: "0.11.0"
examples:
name: Run examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
cache: true
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: examples --src-dir .
version: "0.11.0"
lint:
name: Run linter
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
cache: true
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: lint --src-dir .
version: "0.11.0"
check-generation:
name: Check generation has been run
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
cache: true
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: check-generation --src-dir .
version: "0.11.0"
publish:
name: Publish a new version
permissions:
contents: write
needs: ["tests", "examples", "lint", "check-generation"]
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/setup-go@v5.0.0
with:
go-version-file: go.mod
cache: true
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: publish --src-dir .
version: "0.11.0"