Skip to content

Commit

Permalink
Use workflow_call instead of duplicating the test action
Browse files Browse the repository at this point in the history
  • Loading branch information
daaang committed Aug 22, 2024
1 parent 3920d4b commit 75fd6c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: ["production"]
pull_request:
workflow_call:

jobs:
test:
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,7 @@ on: "workflow_dispatch"

jobs:
test:
runs-on: "ubuntu-latest"
strategy:
matrix:
task:
- "spec"
- "lint"
- "metadata_lint"
- "syntax"
- "rubocop"
steps:
- uses: "actions/checkout@v4"
- name: "rake ${{ matrix.task }}"
run: |
docker run --rm `docker build -q .` rake ${{ matrix.task }}
uses: "./.github/workflows/ci.yml"

release:
runs-on: "ubuntu-latest"
Expand All @@ -42,6 +29,8 @@ jobs:
- name: "gh release create"
run: |
gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }} -F OUTPUT.md
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "pdk publish"
uses: "docker://puppet/pdk:3.0.0.0"
with:
Expand Down

0 comments on commit 75fd6c2

Please sign in to comment.