Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
64J0 committed Jun 19, 2024
1 parent ec359a2 commit 0b02020
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/example-001.yml
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 }}
37 changes: 37 additions & 0 deletions .github/workflows/git-tag-to-workflow-dispatch.yml
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 }}
4 changes: 4 additions & 0 deletions README.org
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.

0 comments on commit 0b02020

Please sign in to comment.