diff --git a/.github/workflows/publish.yml b/.github/workflows/cd-to-infra.yml similarity index 75% rename from .github/workflows/publish.yml rename to .github/workflows/cd-to-infra.yml index 0dfa812ab..8966ee022 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/cd-to-infra.yml @@ -1,11 +1,10 @@ -name: Publish and Deploy Image +name: Continuous Deployment to Infra on: push: branches: [ "main" ] release: - types: [published, edited] - workflow_dispatch: + types: [created, published, edited, prereleased, released] env: AWS_REGION: ${{ secrets.AWS_REGION }} @@ -43,7 +42,7 @@ jobs: # Use the release tag to deploy, if one is available. DEPLOY_TAG=$RELEASE_TAG fi - # make SHA="${{ github.SHA }}" SHA_TAG="$SHA_TAG" RELEASE_TAG="$RELEASE_TAG" publish-docker + make SHA="${{ github.SHA }}" SHA_TAG="$SHA_TAG" RELEASE_TAG="$RELEASE_TAG" publish-docker echo "Deploy tag:" echo ${DEPLOY_TAG} echo "deploy_tag=${DEPLOY_TAG}" >> $GITHUB_OUTPUT @@ -56,19 +55,20 @@ jobs: - uses: actions/checkout@v3 - - # TODO: Uncomment and remove echo name: Schedule k8s deployment run: | echo "Workflow triggered by: ${{ github.event_name }}" - if [[ "${{github.event_name}}" == "release" ]]; then + if [[ "${{ github.event_name }}" == "release" ]]; then echo "Release action: ${{ github.event.action }}" - if [${{ github.event.release.prerelease }}]; then + if [[ "${{ github.event.action }}" == "prereleased" ]]; then DEPLOY_ENV="tnet" - else + elif [[ "${{ github.event.action }}" == "released" ]]; then DEPLOY_ENV="prod" fi else DEPLOY_ENV="qa" fi - # make DEPLOY_ENV="$DEPLOY_ENV" DEPLOY_TAG=${{ needs.publish.outputs.deploy_tag }} schedule-k8s-deployment - echo "DEPLOY_ENV is $DEPLOY_ENV" \ No newline at end of file + if [[ -n "$DEPLOY_ENV" ]]; then + make DEPLOY_ENV="$DEPLOY_ENV" DEPLOY_TAG=${{ needs.publish.outputs.deploy_tag }} schedule-k8s-deployment + fi + echo "DEPLOY_ENV is $DEPLOY_ENV" diff --git a/.github/workflows/release-pr.yml b/.github/workflows/create-release-pr.yml similarity index 100% rename from .github/workflows/release-pr.yml rename to .github/workflows/create-release-pr.yml diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/manual-deploy-to-infra.yml similarity index 96% rename from .github/workflows/deploy-image.yml rename to .github/workflows/manual-deploy-to-infra.yml index 36c659201..28db88c58 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/manual-deploy-to-infra.yml @@ -1,4 +1,4 @@ -name: Deploy to Durable Infra +name: Manual Deployment to Infra on: workflow_dispatch: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr-semantic-message.yml similarity index 100% rename from .github/workflows/pr.yml rename to .github/workflows/pr-semantic-message.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust-build-and-test.yml similarity index 99% rename from .github/workflows/rust.yml rename to .github/workflows/rust-build-and-test.yml index 139635265..a3f644543 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust-build-and-test.yml @@ -1,4 +1,4 @@ -name: Rust +name: Rust Build and Test on: push: