-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
OSOE-861: Add Git tags for Azure deployments and swaps
- Loading branch information
Showing
10 changed files
with
229 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Create Timestamp | ||
description: > | ||
Create a timestamp in ISO 8601 format for use in tags (replaces ":" with "." for use in git tags). Intentionally not | ||
documented in Actions.md since it's only meant for internal use. | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Get Timestamp | ||
id: get-timestamp | ||
shell: pwsh | ||
run: | | ||
# Get the current timestamp in the ISO 8601 format but replace ":" with "." because we can't use ":" in tags. | ||
$timestamp = ((Get-Date).ToUniversalTime().GetDateTimeFormats('s')[0]) | ||
$timestampTag = $timestamp -replace ":", "-" | ||
echo "timestamp=$timestamp" >> $env:GITHUB_OUTPUT | ||
echo "timestamp-tag=$timestampTag" >> $env:GITHUB_OUTPUT | ||
outputs: | ||
timestamp: | ||
description: The generated timestamp. | ||
value: ${{ steps.get-timestamp.outputs.timestamp }} | ||
timestamp-tag: | ||
description: The generated timestamp parsed as a usable git tag. | ||
value: ${{ steps.get-timestamp.outputs.timestamp-tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Remove Old Latest Tags | ||
description: > | ||
Removes the old prefix/latest tag so that a new one can be set. Intentionally not documented in Actions.md since | ||
it's only meant for internal use. | ||
inputs: | ||
tag-prefix: | ||
description: The prefix for the tag we are removing. | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Delete Latest Tag | ||
shell: pwsh | ||
run: | | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
git config user.name 'github-actions[bot]' | ||
git fetch --tags | ||
$latestTag = (git tag --list '${{ inputs.tag-prefix }}/latest') | ||
if ($latestTag) | ||
{ | ||
git tag --delete '${{ inputs.tag-prefix }}/latest' | ||
git push origin ':refs/tags/${{ inputs.tag-prefix }}/latest' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters