diff --git a/.github/workflows/alerts-ee.yaml b/.github/workflows/alerts-ee.yaml index 4c1d3b6c4..9cdc5bb07 100644 --- a/.github/workflows/alerts-ee.yaml +++ b/.github/workflows/alerts-ee.yaml @@ -145,11 +145,14 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' -# - name: Debug Job -# # if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 -# env: -# DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} -# IMAGE_TAG: ${{ github.sha }}-ee -# ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + diff --git a/.github/workflows/alerts.yaml b/.github/workflows/alerts.yaml index a24f2b855..0548ca4f0 100644 --- a/.github/workflows/alerts.yaml +++ b/.github/workflows/alerts.yaml @@ -133,12 +133,15 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml index 32c1cb627..e3ed20071 100644 --- a/.github/workflows/api-ee.yaml +++ b/.github/workflows/api-ee.yaml @@ -144,11 +144,15 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }}-ee - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true + + diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index 451ae64b5..eece8c516 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -133,11 +133,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/assist-ee.yaml b/.github/workflows/assist-ee.yaml index be5678143..7a7344909 100644 --- a/.github/workflows/assist-ee.yaml +++ b/.github/workflows/assist-ee.yaml @@ -116,11 +116,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/assist-stats.yaml b/.github/workflows/assist-stats.yaml index 249d51d81..b2dd51783 100644 --- a/.github/workflows/assist-stats.yaml +++ b/.github/workflows/assist-stats.yaml @@ -130,11 +130,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/assist.yaml b/.github/workflows/assist.yaml index 970b56016..21d753c12 100644 --- a/.github/workflows/assist.yaml +++ b/.github/workflows/assist.yaml @@ -115,11 +115,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/crons-ee.yaml b/.github/workflows/crons-ee.yaml index b357fea65..a9e14710d 100644 --- a/.github/workflows/crons-ee.yaml +++ b/.github/workflows/crons-ee.yaml @@ -145,11 +145,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }}-ee - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/db-migrate.yaml b/.github/workflows/db-migrate.yaml index 134e2dafa..3f2992a0a 100644 --- a/.github/workflows/db-migrate.yaml +++ b/.github/workflows/db-migrate.yaml @@ -140,12 +140,13 @@ jobs: IMAGE_TAG: ${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: eu-central-1 - # AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/frontend-dev.yaml b/.github/workflows/frontend-dev.yaml index fa7137d1c..cf9b16a41 100644 --- a/.github/workflows/frontend-dev.yaml +++ b/.github/workflows/frontend-dev.yaml @@ -78,4 +78,4 @@ jobs: helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -n app -f - env: DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} + iMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index 6ef04ea87..fbc4d00e7 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -133,11 +133,12 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_REGION: eu-central-1 - # AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/patch-build.yaml b/.github/workflows/patch-build.yaml new file mode 100644 index 000000000..67f3fa5c3 --- /dev/null +++ b/.github/workflows/patch-build.yaml @@ -0,0 +1,149 @@ +# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions + +on: + workflow_dispatch: + description: 'This workflow will build for patches for latest tag, and will Always use commit from main branch.' + inputs: + services: + description: 'Comma separated names of services to build(in small letters).' + required: true + default: 'chalice,frontend' + +name: Build patches from main branch, Raise PR to Main, and Push to tag + +jobs: + deploy: + name: Build Patch from main + runs-on: ubuntu-latest + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} + DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Downloading yq + run: | + VERSION="v4.42.1" + sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + + # Configure AWS credentials for the first registry + - name: Configure AWS credentials for RELEASE_ARM_REGISTRY + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_DEPOT_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.AWS_DEPOT_SECRET_KEY }} + aws-region: ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} + + - name: Login to Amazon ECR for RELEASE_ARM_REGISTRY + id: login-ecr-arm + run: | + aws ecr get-login-password --region ${{ secrets.AWS_DEPOT_DEFAULT_REGION }} | docker login --username AWS --password-stdin ${{ secrets.RELEASE_ARM_REGISTRY }} + aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.RELEASE_OSS_REGISTRY }} + + - uses: depot/setup-action@v1 + - name: Get HEAD Commit ID + run: echo "HEAD_COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV + - name: Define Branch Name + run: echo "BRANCH_NAME=patch/main/${HEAD_COMMIT_ID}" >> $GITHUB_ENV + - name: Set Remote with GITHUB_TOKEN + run: | + git config --unset http.https://github.com/.extraheader + git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git + + - name: Build + id: build-image + env: + DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }} + DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }} + MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }} + MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }} + MSAAS_REPO_FOLDER: /tmp/msaas + run: | + set -exo pipefail + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git checkout -b $BRANCH_NAME + working_dir=$(pwd) + function image_version(){ + local service=$1 + chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$service/Chart.yaml" + current_version=$(yq eval '.AppVersion' $chart_path) + new_version=$(echo $current_version | awk -F. '{$NF += 1 ; print $1"."$2"."$3}') + echo $new_version + # yq eval ".AppVersion = \"$new_version\"" -i $chart_path + } + function clone_msaas() { + [ -d $MSAAS_REPO_FOLDER ] || { + git clone -b dev --recursive https://x-access-token:$MSAAS_REPO_CLONE_TOKEN@$MSAAS_REPO_URL $MSAAS_REPO_FOLDER + cd $MSAAS_REPO_FOLDER + bash git-init.sh + git checkout + } + } + function build_managed() { + local service=$1 + local version=$2 + echo building managed + clone_msaas + if [[ $service == 'chalice' ]]; then + cd $MSAAS_REPO_FOLDER/openreplay/api + else + cd $MSAAS_REPO_FOLDER/openreplay/$service + fi + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh >> /tmp/arm.txt + } + # Checking for backend images + ls backend/cmd >> /tmp/backend.txt + echo Services: "${{ github.event.inputs.services }}" + IFS=',' read -ra SERVICES <<< "chalice,frontend,http" + # Build FOSS + for SERVICE in "${SERVICES[@]}"; do + # Check if service is backend + if grep -q $SERVICE /tmp/backend.txt; then + cd backend + foss_build_args="nil $SERVICE" + ee_build_args="ee $SERVICE" + else + [[ $SERVICE == 'chalice' ]] && cd $working_dir/api || cd $SERVICE + ee_build_args="ee" + fi + version=$(image_version $SERVICE) + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash build.sh $foss_build_args + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=amd64 DOCKER_REPO=$DOCKER_REPO_OSS PUSH_IMAGE=0 bash build.sh $ee_build_args + if [[ "$SERVICE" != "chalice" && "$SERVICE" != "frontend" ]]; then + IMAGE_TAG=$version DOCKER_RUNTIME="depot" DOCKER_BUILD_ARGS="--push" ARCH=arm64 DOCKER_REPO=$DOCKER_REPO_ARM PUSH_IMAGE=0 bash build.sh $foss_build_args + else + build_managed $SERVICE $version + fi + cd $working_dir + chart_path="$working_dir/scripts/helmcharts/openreplay/charts/$SERVICE/Chart.yaml" + yq eval ".AppVersion = \"$version\"" -i $chart_path + git add $chart_path + git commit -m "Increment $SERVICE chart version" + git push --set-upstream origin $BRANCH_NAME + done + + - name: Create Pull Request + uses: repo-sync/pull-request@v2 + with: + github_token: ${{ secrets.ACTIONS_COMMMIT_TOKEN }} + source_branch: ${{ env.BRANCH_NAME }} + destination_branch: "main" + pr_title: "Updated patch build from main $HEAD_COMMIT_ID" + pr_body: "This PR updates the Helm chart version after building the patch from $HEAD_COMMIT_ID." + + # - name: Debug Job + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO_ARM: ${{ secrets.RELEASE_ARM_REGISTRY }} + # DOCKER_REPO_OSS: ${{ secrets.RELEASE_OSS_REGISTRY }} + # MSAAS_REPO_CLONE_TOKEN: ${{ secrets.MSAAS_REPO_CLONE_TOKEN }} + # MSAAS_REPO_URL: ${{ secrets.MSAAS_REPO_URL }} + # MSAAS_REPO_FOLDER: /tmp/msaas + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/peers-ee.yaml b/.github/workflows/peers-ee.yaml index ce014a45f..57be8b9fc 100644 --- a/.github/workflows/peers-ee.yaml +++ b/.github/workflows/peers-ee.yaml @@ -133,11 +133,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/peers.yaml b/.github/workflows/peers.yaml index ef564ec65..1026127f0 100644 --- a/.github/workflows/peers.yaml +++ b/.github/workflows/peers.yaml @@ -130,11 +130,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/pr-env-delete.yaml b/.github/workflows/pr-env-delete.yaml index c5f9ceca4..94fad132b 100644 --- a/.github/workflows/pr-env-delete.yaml +++ b/.github/workflows/pr-env-delete.yaml @@ -83,4 +83,4 @@ jobs: ] } EOF - aws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json + iws route53 change-resource-record-sets --hosted-zone-id ${{ secrets.OR_PR_HOSTED_ZONE_ID }} --change-batch file://route53-changes.json diff --git a/.github/workflows/pr-env.yaml b/.github/workflows/pr-env.yaml index 64e3a57eb..8a281fb3c 100644 --- a/.github/workflows/pr-env.yaml +++ b/.github/workflows/pr-env.yaml @@ -329,10 +329,12 @@ jobs: # run: | # # Add any cleanup commands if necessary - - name: Debug Job - if: failure() - uses: mxschmitt/action-tmate@v3 - env: - DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - IMAGE_TAG: ${{ github.sha }} - ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/sourcemaps-reader-ee.yaml b/.github/workflows/sourcemaps-reader-ee.yaml index 0bee8ba4e..807bb3e22 100644 --- a/.github/workflows/sourcemaps-reader-ee.yaml +++ b/.github/workflows/sourcemaps-reader-ee.yaml @@ -132,11 +132,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/sourcemaps-reader.yaml b/.github/workflows/sourcemaps-reader.yaml index bbc7ae887..0259f8973 100644 --- a/.github/workflows/sourcemaps-reader.yaml +++ b/.github/workflows/sourcemaps-reader.yaml @@ -131,11 +131,13 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/tracker-tests.yaml b/.github/workflows/tracker-tests.yaml index fa73f34a6..7cf1de010 100644 --- a/.github/workflows/tracker-tests.yaml +++ b/.github/workflows/tracker-tests.yaml @@ -72,4 +72,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} flags: tracker - name: tracker + iame: tracker diff --git a/.github/workflows/update-tag.yaml b/.github/workflows/update-tag.yaml new file mode 100644 index 000000000..6ec90ad32 --- /dev/null +++ b/.github/workflows/update-tag.yaml @@ -0,0 +1,35 @@ +on: + workflow_dispatch: + description: 'This workflow will build for patches for latest tag, and will Always use commit from main branch.' + inputs: + services: + description: 'This action will update the latest tag with current main branch HEAD. Should I proceed ? true/false' + required: true + default: 'false' + +name: Force Push tag with main branch HEAD + +jobs: + deploy: + name: Build Patch from main + runs-on: ubuntu-latest + env: + DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} + DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Remote with GITHUB_TOKEN + run: | + git config --unset http.https://github.com/.extraheader + git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_COMMMIT_TOKEN }}@github.com/${{ github.repository }}.git + - name: Push main branch to tag + run: | + git fetch --tags + git checkout main + git push origin HEAD:refs/tags/$(git describe --tags `git rev-list --tags --max-count=1`) --force + # - name: Debug Job + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true diff --git a/.github/workflows/workers-ee.yaml b/.github/workflows/workers-ee.yaml index b75d22093..031d55b73 100644 --- a/.github/workflows/workers-ee.yaml +++ b/.github/workflows/workers-ee.yaml @@ -169,11 +169,12 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true diff --git a/.github/workflows/workers.yaml b/.github/workflows/workers.yaml index 0d9927df9..165ac78d3 100644 --- a/.github/workflows/workers.yaml +++ b/.github/workflows/workers.yaml @@ -166,11 +166,12 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - # - name: Debug Job - # if: ${{ failure() }} - # uses: mxschmitt/action-tmate@v3 - # env: - # DOCKER_REPO: ${{ secrets.OSS_REGISTRY_URL }} - # IMAGE_TAG: ${{ github.sha }} - # ENVIRONMENT: staging - # + # - name: Debug Job + # # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging + # with: + # iimit-access-to-actor: true