ci: move validate to a dedicated workflow

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-03-26 14:26:31 +02:00
parent 49bde5a54a
commit a89868cdc5
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
3 changed files with 44 additions and 19 deletions

View File

@ -10,25 +10,6 @@ on:
- '.github/*-releases.json' - '.github/*-releases.json'
jobs: jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- lint
- vendor-validate
- license-validate
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Validate
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

43
.github/workflows/validate.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: validate
on:
workflow_dispatch:
push:
branches:
- 'main'
pull_request:
paths-ignore:
- '.github/*-releases.json'
jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
targets: ${{ steps.targets.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Matrix
id: targets
run: |
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
validate:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Validate
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}

View File

@ -2,6 +2,7 @@
[![Downloads](https://img.shields.io/npm/dw/@docker/actions-toolkit?logo=npm&style=flat-square)](https://www.npmjs.com/package/@docker/actions-toolkit) [![Downloads](https://img.shields.io/npm/dw/@docker/actions-toolkit?logo=npm&style=flat-square)](https://www.npmjs.com/package/@docker/actions-toolkit)
[![Build workflow](https://img.shields.io/github/actions/workflow/status/docker/actions-toolkit/build.yml?label=build&logo=github&style=flat-square)](https://github.com/docker/actions-toolkit/actions?workflow=build) [![Build workflow](https://img.shields.io/github/actions/workflow/status/docker/actions-toolkit/build.yml?label=build&logo=github&style=flat-square)](https://github.com/docker/actions-toolkit/actions?workflow=build)
[![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/actions-toolkit/test.yml?label=test&logo=github&style=flat-square)](https://github.com/docker/actions-toolkit/actions?workflow=test) [![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/actions-toolkit/test.yml?label=test&logo=github&style=flat-square)](https://github.com/docker/actions-toolkit/actions?workflow=test)
[![Validate workflow](https://img.shields.io/github/actions/workflow/status/docker/actions-toolkit/validate.yml?label=validate&logo=github&style=flat-square)](https://github.com/docker/actions-toolkit/actions?workflow=validate)
[![Codecov](https://img.shields.io/codecov/c/github/docker/actions-toolkit?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/actions-toolkit) [![Codecov](https://img.shields.io/codecov/c/github/docker/actions-toolkit?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/actions-toolkit)
# Actions Toolkit # Actions Toolkit