mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 03:35:00 +00:00
Merge pull request #288 from PepperDash/feature/action-updates
Update Actions to add a PR-triggered action for Dev only
This commit is contained in:
10
.github/scripts/GenerateVersionNumber.ps1
vendored
10
.github/scripts/GenerateVersionNumber.ps1
vendored
@@ -1,5 +1,8 @@
|
|||||||
$latestVersions = $(git tag --merged origin/main)
|
$latestVersions = $(git tag --merged origin/main)
|
||||||
$latestVersion = [version]"0.0.0"
|
$latestVersion = [version]"0.0.0"
|
||||||
|
Write-Host "GITHUB_REF: $($Env:GITHUB_REF)"
|
||||||
|
Write-Host "GITHUB_HEAD_REF: $($Env:GITHUB_HEAD_REF)"
|
||||||
|
Write-Host "GITHUB_BASE_REF: $($Env:GITHUB_BASE_REF)"
|
||||||
Foreach ($version in $latestVersions) {
|
Foreach ($version in $latestVersions) {
|
||||||
Write-Host $version
|
Write-Host $version
|
||||||
try {
|
try {
|
||||||
@@ -17,7 +20,13 @@ Foreach ($version in $latestVersions) {
|
|||||||
$newVersion = [version]$latestVersion
|
$newVersion = [version]$latestVersion
|
||||||
$phase = ""
|
$phase = ""
|
||||||
$newVersionString = ""
|
$newVersionString = ""
|
||||||
|
|
||||||
switch -regex ($Env:GITHUB_REF) {
|
switch -regex ($Env:GITHUB_REF) {
|
||||||
|
'^refs\/pull\/*.' {
|
||||||
|
$splitRef = $Env:GITHUB_REF -split "/"
|
||||||
|
$phase = "pr$($splitRef[2])"
|
||||||
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
|
}
|
||||||
'^refs\/heads\/main*.' {
|
'^refs\/heads\/main*.' {
|
||||||
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
|
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
|
||||||
}
|
}
|
||||||
@@ -43,6 +52,7 @@ switch -regex ($Env:GITHUB_REF) {
|
|||||||
$phase = 'hotfix'
|
$phase = 'hotfix'
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@@ -8,6 +8,9 @@ on:
|
|||||||
- bugfix/*
|
- bugfix/*
|
||||||
- release/*
|
- release/*
|
||||||
- development
|
- development
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- development
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
# solution path doesn't need slashes unless there it is multiple folders deep
|
||||||
@@ -29,14 +32,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
# And any submodules
|
submodules: true
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
# Fetch all tags
|
# Fetch all tags
|
||||||
- name: Fetch tags
|
- name: Fetch tags
|
||||||
run: git fetch --tags
|
run: git fetch --tags
|
||||||
|
|||||||
Reference in New Issue
Block a user