From 931e8b3fc46fd5e9ddf3b336440eb163cb219342 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Tue, 25 Mar 2025 10:06:05 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Add=20version=20tagging=20w?= =?UTF-8?q?orkflow=20and=20update=20action=20demo=20trigger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/action-test.yaml | 2 +- .gitea/workflows/version-tag.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/version-tag.yaml diff --git a/.gitea/workflows/action-test.yaml b/.gitea/workflows/action-test.yaml index c537cc6..a28e574 100644 --- a/.gitea/workflows/action-test.yaml +++ b/.gitea/workflows/action-test.yaml @@ -1,6 +1,6 @@ name: Gitea Actions Demo run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +on: workflow_dispatch jobs: Explore-Gitea-Actions: diff --git a/.gitea/workflows/version-tag.yaml b/.gitea/workflows/version-tag.yaml new file mode 100644 index 0000000..03246a0 --- /dev/null +++ b/.gitea/workflows/version-tag.yaml @@ -0,0 +1,27 @@ +name: Gitea Actions Demo +run-name: Use TrunkVer as repo tag +# on: [push] +on: [workflow_dispatch] + +jobs: + create-tag: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate TrunkVer + id: trunkver + uses: https://github.com/crftd-tech/trunkver@main + + - name: Create tag + env: + TRUNKVER: ${{ steps.trunkver.outputs.trunkver }} + uses: https://github.com/rickstaa/action-create-tag@v1 + id: "tag_create" + with: + tag: "$TRUNKVER" + tag_exists_error: false + message: "Latest pushed commit"