Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:

- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Get current or bumped version tag
id: bumpVersion
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/shared-build-deploy-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,19 @@ jobs:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.load-environment.outputs.environment }}
runnerName: ${{ steps.load-environment.outputs.runnerName }}
tagPrefix: ${{ steps.load-environment.outputs.tagPrefix }}
steps:
- name: Checkout calling repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Checkout trakx/github-actions repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: trakx/github-actions
path: ./github-actions-shared-build-deploy-container
ref: ${{ inputs.actionsRepoRef }}

- name: Load environment and runner
- name: Load environment
id: load-environment
uses: ./github-actions-shared-build-deploy-container/load-environment

Expand Down Expand Up @@ -98,13 +97,13 @@ jobs:
build-push-container-image:
name: "Build and push container image"
needs: [ prepare-and-validate ]
runs-on: ${{ needs.prepare-and-validate.outputs.runnerName }}
runs-on: ubuntu-latest
steps:
- name: Checkout calling repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Checkout trakx/github-actions repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: trakx/github-actions
path: ./github-actions-shared-build-deploy-container
Expand Down Expand Up @@ -135,18 +134,18 @@ jobs:
deploy-kubernetes:
name: "Deploy image to Kubernetes"
needs: [ prepare-and-validate, build-push-container-image ]
runs-on: ${{ needs.prepare-and-validate.outputs.runnerName }}
runs-on: ubuntu-latest
if: |
always() &&
(needs.build-push-container-image.result == 'success' || (needs.build-push-container-image.result == 'skipped'
&& github.event_name == 'workflow_run'
&& github.event.workflow_run.conclusion == 'success' ))
steps:
- name: Checkout calling repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Checkout trakx/github-actions repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: trakx/github-actions
path: ./github-actions-shared-build-deploy-container
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/shared-deploy-container-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,31 @@ jobs:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.load-environment.outputs.environment }}
runnerName: ${{ steps.load-environment.outputs.runnerName }}
steps:
- name: Checkout calling repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Checkout trakx/github-actions repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: trakx/github-actions
path: ./github-actions-shared-deploy-image
ref: ${{ inputs.actionsRepoRef }}

- name: "Detect Environment and Runner"
- name: "Detect Environment"
shell: bash
id: load-environment
run: |
if [[ "${{ inputs.environment }}" == "prod" ]]; then
DETECTED_ENVIRONMENT="production"
RUNNER_NAME="prod-trakx-runner"
elif [[ "${{ inputs.environment }}" == "stage" ]]; then
DETECTED_ENVIRONMENT="staging"
RUNNER_NAME="stage-trakx-runner"
else
DETECTED_ENVIRONMENT="development"
RUNNER_NAME="dev-trakx-runner"
fi

echo "Detected Environment is: $DETECTED_ENVIRONMENT"
echo "Detected Runner is: $RUNNER_NAME"

echo "environment=$DETECTED_ENVIRONMENT" >> $GITHUB_OUTPUT
echo "runnerName=$RUNNER_NAME" >> $GITHUB_OUTPUT

- name: Outputs if this is a workflow_dispatch for production (manual deploy)
shell: bash
Expand Down Expand Up @@ -100,13 +93,13 @@ jobs:
deploy-kubernetes:
name: "Deploy image to Kubernetes"
needs: [ prepare-and-validate ]
runs-on: ${{ needs.prepare-and-validate.outputs.runnerName }}
runs-on: ubuntu-latest
steps:
- name: Checkout calling repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Checkout trakx/github-actions repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: trakx/github-actions
path: ./github-actions-shared-deploy-image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:

- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Get current or bumped version tag
id: bumpVersion
Expand Down