diff --git a/.github/workflows/dagger-static-checks.yaml b/.github/workflows/dagger-static-checks.yaml index 33b5354..88221f0 100644 --- a/.github/workflows/dagger-static-checks.yaml +++ b/.github/workflows/dagger-static-checks.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Run Dagger static checks uses: dagger/dagger-for-github@v8.2.0 diff --git a/.github/workflows/dagger-tests.yaml b/.github/workflows/dagger-tests.yaml index 8fb6ee5..0ba19d9 100644 --- a/.github/workflows/dagger-tests.yaml +++ b/.github/workflows/dagger-tests.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Run Dagger tests and generate report uses: dagger/dagger-for-github@v8.2.0 diff --git a/Taskfile.yaml b/Taskfile.yaml index 253a26b..20205ad 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -1,5 +1,9 @@ --- version: 3 +includes: + git: + taskfile: https://raw.githubusercontent.com/stuttgart-things/platform-engineering-showcase/refs/heads/main/taskfiles/git.yaml + vars: PROJECT_NAME: sh: echo ${PWD##*/} @@ -11,10 +15,6 @@ vars: DATE: sh: date -Ih -includes: - git: - taskfile: https://raw.githubusercontent.com/stuttgart-things/platform-engineering-showcase/refs/heads/main/taskfiles/git.yaml - tasks: test-all: cmds: @@ -43,11 +43,6 @@ tasks: FUNCTION: run-static-stage REPORT_PATH: /tmp/{{ .PROJECT_NAME }}-static-analysis-report.json - default: - desc: Default task is select & do (work) - cmds: - - task do - check: desc: "Run pre-commit hooks" cmds: @@ -68,12 +63,6 @@ tasks: - cmd: golangci-lint run ignore_error: true - test: - desc: Test code - cmds: - - go mod tidy - - cmd: go test ./... -v - tag: desc: Commit, push & tag the module deps: [lint, test, commit] @@ -83,9 +72,17 @@ tasks: - git tag -a {{ .TAG }} -m 'updated for stuttgart-things {{.DATE}} for tag version {{ .TAG }}' - git push origin --tags + default: + desc: Default task is select & do (work) + cmds: + - task do + do: desc: Select a task to run cmds: - | - task=$(yq e '.tasks | keys' Taskfile.yaml | sed 's/^- //' | gum choose) - task ${task} + # Extract task names (keep internal colons, remove only trailing colon) + task_name=$(task -l | awk '/^\*/ {print $2}' | sed 's/:$//' | gum choose) + + # Run the selected task + [ -n "$task_name" ] && task "$task_name"