-
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.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 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,30 @@ | ||
name: Example 001 | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
app: | ||
description: "The app to release. The name should be the same as name in package.json" | ||
required: true | ||
version: | ||
description: "The version to release. The version should be the same as version in package.json. For example, 1.0.0" | ||
required: true | ||
type: choice | ||
options: | ||
- v1.0.0 | ||
- v0.9.0 | ||
- v0.8.0 | ||
name: | ||
description: "The app name" | ||
required: false | ||
default: "new-app" | ||
|
||
jobs: | ||
release: | ||
name: Deploy | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ref/tags/${{ inputs.version }} |
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,37 @@ | ||
name: On tag creation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: # https://github.com/orgs/community/discussions/25302 | ||
- '*' | ||
|
||
jobs: | ||
test-git-tag-to-workflow-dispatch: | ||
name: Test git-tag-to-workflow-dispatch | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
files: [example-001.yml] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # to get the tags | ||
- name: Get the repository tags | ||
run: | | ||
THIS_GIT_TAGS=$(git tag --sort -creatordate --column) | ||
echo "Git tags: ${THIS_GIT_TAGS}" | ||
echo "THIS_GIT_TAGS=${THIS_GIT_TAGS}" >> "${GITHUB_ENV}" | ||
- name: Run custom action | ||
uses: FsharpGHActions/[email protected] | ||
with: | ||
values-to-take: 5 | ||
workflow-file-name: ${{ matrix.files }} | ||
workflow-yaml-key: 'version' | ||
pull-request: true | ||
# needs to be a PAT to update the workflows/ folder | ||
github-token: ${{ secrets.PAT_GITHUB }} | ||
git-tags: ${{ env.THIS_GIT_TAGS }} |
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,4 @@ | ||
#+TITLE: GH Samples | ||
|
||
This repository holds some sample workflows to validate that the actions are | ||
working as expected. |