actions/— shared composite actions (recommended paths).github/workflows/— reusable workflows + self-tests
Fetch secrets from Bitwarden Secrets Manager (BWS) into files and export *_FILE
environment variables for downstream steps. This repo consumes the shared action
from shared-common/gh-actions-shared.
Usage:
- uses: shared-common/gh-actions-shared/.github/actions/bws-fetch@9ab134ec04b39da8a91b39df5911048f7ae00c38
with:
access-token: ${{ secrets.BWS_ACCESS_TOKEN }}
project-id: ${{ secrets.BWS_PROJECT_ID }}
secrets: GH_ORG_RELEASE,GH_ORG_RELEASE_APP_ID,GH_ORG_RELEASE_APP_INSTALL_ID,GH_ORG_RELEASE_APP_PEM
bws-version: ${{ vars.BWS_VERSION }}
bws-sha256: ${{ vars.BWS_SHA256 }}Creates a GitHub App installation token using secrets stored in BWS.
Usage:
- uses: emcram/gh-actions/actions/github-app-token@<sha>
with:
bws-access-token: ${{ secrets.BWS_ACCESS_TOKEN }}
bws-project-id: ${{ secrets.BWS_PROJECT_ID }}
bws-version: ${{ vars.BWS_VERSION }}
bws-sha256: ${{ vars.BWS_SHA256 }}Ensures a tag points to the tip of a release branch; optionally requires it to not be a merge commit.
Usage (recommended: pin to SHA):
- uses: emcram/gh-actions/actions/require-release-tip@dde7f9b094c1abd78c58f1975b27cc953b62dba7
with:
release_branch: mcr/release
Optional inputs:
- `release_branch` (default: `mcr/release`)
- `remote` (default: `origin`)
- `allow_merge_commits` (default: `false`)
Security notes:
- Pin to a full commit SHA for supply-chain safety.
- Keep this repo free of secrets or internal endpoints.
### require-gl-tag
Ensures a workflow runs only on tags that match release-tag policy.
Usage:
```yaml
- uses: emcram/gh-actions/actions/require-gl-tag@<sha>
with:
tag_regex: '(^[0-9]{1,10}$|^.*[^0-9][0-9]{1,10}$)'
Default policy when tag_regex is omitted:
- Tag must end with a numeric suffix.
- Trailing numeric suffix length must be between 1 and 10 digits.
- Optional
tag_prefixcan still be used for stricter project-local matching.
Validates a release tag and (optionally) matches it to an expected version.
Usage:
- uses: emcram/gh-actions/actions/validate-tag-version@<sha>
with:
allow_revision_suffix: "true"Notes:
tag_prefixis optional.- Default tag policy requires only a trailing numeric suffix of 1-10 digits.
expected_versionis optional and compares against the parsed base version.
Creates a GitHub release from artifacts produced by a prior workflow run.
Usage:
jobs:
release:
uses: emcram/gh-actions/.github/workflows/release-from-workflow-run.yml@<sha>
with:
tag: ${{ needs.resolve_tag.outputs.tag }}
run_id: ${{ github.event.workflow_run.id }}
artifact_prefix: your-project-linux-x86_64-
tarball_prefix: your-project-linux-x86_64-
checksum_prefix: your-project-sha256-checksums-
release_name: your-project v{version}
secrets: inheritNotes:
- For tag-driven
workflow_runcallers, resolve the tag fromgithub.event.workflow_run.head_sha(do not rely onhead_branch). - Tags must pass the default trailing 1-10 digit suffix policy unless a custom
tag_regexis provided. - Requires
BWS_ACCESS_TOKENandBWS_PROJECT_IDsecrets (and the GitHub App secrets in BWS). bws_version/bws_sha256default tovars.BWS_VERSIONandvars.BWS_SHA256when unset.- Runs shared
security-gatesbefore publishing by default; disable withrun_security_gates: falseif needed. - Deletes all workflow artifacts and caches in the repo (logs are retained).
- This is destructive and will wipe caches for every ref; only use if that matches org policy.
- Allow-list the reusable workflow and the github-app-token action:
mattycramer/gh-actions/.github/workflows/release-from-workflow-run.yml@<sha>mattycramer/gh-actions/actions/github-app-token@24fa0b1b9c20445eb84e314dde824752572595c0
Runs shared dependency and vulnerability gates for repo-agnostic callers.
Usage:
jobs:
security:
uses: mattycramer/gh-actions/.github/workflows/security-gates.yml@<sha>
with:
caller_event_name: ${{ github.event_name }}
checkout_ref: ${{ github.sha }}
fail_on_severity: high
osv_scan_args: |-
-r
.Notes:
- Pass
caller_event_name: ${{ github.event_name }}so PR-only checks evaluate correctly. dependency-review-actionruns only whencaller_event_nameispull_request.osv-scanner-actionruns for any caller event unless disabled.