Improved tagging
This commit is contained in:
@@ -1,8 +1,27 @@
|
|||||||
name: Build and Test
|
name: Build and Test
|
||||||
run-name: ${{ gitea.actor }} is triggered a new
|
#run-name: ${{ gitea.actor }} is triggered a new
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
# pull_request:
|
||||||
|
# branches: [main]
|
||||||
|
|
||||||
jobs:
|
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:
|
build_and_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -24,7 +43,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
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:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "my-project",
|
"name": "caperren-com",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user