Skip to content

Commit

Permalink
get version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jdettmannnava committed Feb 10, 2025
1 parent c3b1a22 commit 79df711
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ecs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Build and Deploy'

on:
workflow_call:
inputs:
env:
description: AWS environment to deploy to
required: true
type: 'string'
default: 'dev'
confirm_env:
description: Double check for environment
required: true
type: 'string'
default: ''
ops-ref:
description: Branch of dpc-ops to use
required: false
type: 'string'
default: 'main'

concurrency:
group: ${{ github.workflow }}-${{ inputs.env }}
cancel-in-progress: false

jobs:
get-version-tag:
name: "Get Version Tag"
runs-on: self-hosted
outputs:
version_tag: ${{ steps.get-version-tag.outputs.version_tag }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Get Version Tag"
id: get-version-tag
run: |
VERSION_TAG=`git describe --tags --exact-match`
if [ $? -ne 0 ]; then
BRANCH_HASH=`git show -s --format='%h'`
VERSION_TAG="commit_${BRANCH_HASH}"
fi
echo $VERSION_TAG
echo "version_tag=$VERSION_TAG" >> "$GITHUB_OUTPUT"
# build:
# deploy:
# smoke-test:
17 changes: 17 additions & 0 deletions .github/workflows/temp-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "calll full deploy"

on:
push:
paths:
- .github/workflows/temp-caller.yml
- .github/workflows/ecs-release.yml


job:
runit:
uses: ./.github/workflows/ecs-release.yml
with:
env: test
confirm_env: test
opr-ref: main
secrets: inherit

0 comments on commit 79df711

Please sign in to comment.