Skip to content

Commit

Permalink
chore: remove the step that extract the tags from repo to outside the…
Browse files Browse the repository at this point in the history
… custom action
  • Loading branch information
64J0 committed Jun 15, 2024
1 parent 0b0b656 commit 4991bf9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/on-tag-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # to get the tags
path: tagaction
- name: Get the repository tags
working-directory: ./tagaction
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: ./tagaction
with:
Expand All @@ -42,5 +51,6 @@ jobs:
pull-request: true
github-token: ${{ secrets.GITHUB_TOKEN }}
base-branch: master
git-tags: ${{ env.THIS_GIT_TAGS }}


18 changes: 4 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,12 @@ inputs:
description: >
Specify the pull request base branch.
default: 'main'
git-tags:
description: >
The repository tags.
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # to get the tags
- name: Try to get the tags
shell: bash
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: Setup .NET
uses: actions/setup-dotnet@v4
with:
Expand All @@ -57,7 +47,7 @@ runs:
WORKFLOW_FILE_NAME: ${{ inputs.workflow-file-name }}
WORKFLOW_KEY: ${{ inputs.workflow-yaml-key }}
REPO_PATH: ${{ inputs.repo_path }}
GIT_TAGS: ${{ env.THIS_GIT_TAGS }}
GIT_TAGS: ${{ inputs.git-tags }}
run: dotnet run --project src/ "${GIT_TAGS}"

- name: Merge the workflows
Expand Down

0 comments on commit 4991bf9

Please sign in to comment.