Skip to content

Commit

Permalink
centralize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasmhughes committed Jan 1, 2024
1 parent 73fb592 commit 91f456f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 445 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request or Push

on:
push:
branches:
- 'main' # Run on pushes to main
tags-ignore:
- '*' # Ignore pushes to tags
pull_request:

jobs:
call_central_workflow:
name: CI
uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main
with:
setup-vault: true
permissions:
contents: write
pull-requests: read
32 changes: 32 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tagged Releases

on:
push:
tags:
- "v*" # Only tags starting with "v" for "v1.0.0", etc.

jobs:
get_tag_version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Extract tag name
id: get_version
run: echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})"

call_central_workflow:
needs: get_tag_version
uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main
with:
setup-vault: true
release: true
version: ${{ needs.get_tag_version.outputs.version }}
permissions:
contents: write
id-token: write
pull-requests: read
secrets: inherit
Loading

0 comments on commit 91f456f

Please sign in to comment.