Improved tagging
This commit is contained in:
@@ -1,8 +1,27 @@
|
||||
name: Build and Test
|
||||
run-name: ${{ gitea.actor }} is triggered a new
|
||||
on: [ push ]
|
||||
#run-name: ${{ gitea.actor }} is triggered a new
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
# pull_request:
|
||||
# branches: [main]
|
||||
|
||||
jobs:
|
||||
determine_version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node Environment
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
- name: Acquire Project Metadata
|
||||
id: project_metadata
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION_HASH=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
echo PROJECT_VERSION=$(npm pkg get version --workspaces=false | tr -d \") >> $GITHUB_OUTPUT
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -24,7 +43,10 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: gitea.perren.cloud/caperren/caperren-com:latest
|
||||
tags: |
|
||||
gitea.perren.cloud/caperren/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.project_metadata.outputs.REPO_VERSION_HASH }}
|
||||
gitea.perren.cloud/caperren/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.project_metadata.outputs.PROJECT_VERSION }}
|
||||
gitea.perren.cloud/caperren/caperren-com:latest
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "my-project",
|
||||
"name": "caperren-com",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user