-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from uclahs-cds/nwiltsie-alias-release
Add workflow to update major alias tags, templates
- Loading branch information
Showing
22 changed files
with
1,103 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
# GitHub Actions in use by this repository | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
# Python packages in use by this repository | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
# The template workflows demonstrating use _of_ this repository | ||
- package-ecosystem: "github-actions" | ||
directory: "/templates" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: 🛠️ Update release alias tags | ||
|
||
run-name: Update alias for ${{ github.event.action }} ${{ github.event.release.name }} | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
- deleted | ||
|
||
permissions: | ||
actions: read | ||
contents: write | ||
|
||
jobs: | ||
update-alias: | ||
uses: ./.github/workflows/wf-alias-release.yaml | ||
# Secrets are only required until tool-create-release is made public | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
alias-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Get the version of _this_ repository that is in use so that we can use | ||
# sidecar scripts | ||
- id: workflow-parsing | ||
name: Get SHA of reusuable workflow | ||
env: | ||
REPO: ${{ github.repository }} | ||
RUN_ID: ${{ github.run_id }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
ACTION_DATA=$(gh api "repos/$REPO/actions/runs/$RUN_ID") | ||
echo "::debug::$ACTION_DATA" | ||
SHA=$(echo "$ACTION_DATA" | jq -r '.referenced_workflows | .[] | select(.path | startswith("uclahs-cds/tool-create-release")).sha') | ||
echo "SHA=$SHA" >> "$GITHUB_OUTPUT" | ||
- name: Checkout reusable repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: uclahs-cds/tool-create-release | ||
path: reusable | ||
ref: ${{ steps.workflow-parsing.outputs.SHA }} | ||
token: ${{ secrets.UCLAHS_CDS_REPO_READ_TOKEN }} | ||
|
||
- name: Checkout calling repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: caller | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
# Install the bundled package | ||
- run: pip install ./reusable | ||
|
||
# Update the alias if necessary | ||
- id: alias-release | ||
run: | | ||
git config --file "$REPO_DIR/.git/config" user.name "github-actions[bot]" | ||
git config --file "$REPO_DIR/.git/config" user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
alias-release "$REPO_DIR" "$GITHUB_REF" | ||
env: | ||
REPO_DIR: caller | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.