From d2d7a66e018de54e8637b4acff4dcd0692f39392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ljubo=20Nikoli=C4=87?= Date: Wed, 13 Mar 2024 14:48:37 +0100 Subject: [PATCH] remove conditions --- .github/workflows/airflow-operator.yml | 2 +- .github/workflows/build.yml | 10 +++--- .github/workflows/check-required.yml | 7 ++++- .github/workflows/ci.yml | 6 ++-- .github/workflows/codeql-analysis.yml | 2 ++ .github/workflows/python-client.yml | 2 +- .github/workflows/release-rc.yml | 5 ++- .github/workflows/release.yml | 43 ++++++++++++++------------ .github/workflows/slack-alerts.yml | 2 +- 9 files changed, 46 insertions(+), 33 deletions(-) diff --git a/.github/workflows/airflow-operator.yml b/.github/workflows/airflow-operator.yml index 4868ed39b58..b40c7eacb66 100644 --- a/.github/workflows/airflow-operator.yml +++ b/.github/workflows/airflow-operator.yml @@ -72,7 +72,7 @@ jobs: path: third_party/airflow github-token: ${{secrets.GITHUB_TOKEN}} airflow-integration-tests: - if: github.repository_owner == 'armadaproject' + # if: github.repository_owner == 'armadaproject' # As of December 2022, using 8vcpu runners is slower overall, # due to longer queue times. runs-on: ubuntu-22.04 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ca0ff98457..9601a630388 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,8 @@ on: jobs: prepare: - runs-on: ubuntu-latest-16-cores - if: github.repository_owner == 'armadaproject' + runs-on: ubuntu-latest + # if: github.repository_owner == 'armadaproject' steps: - uses: actions/checkout@v4 with: @@ -32,16 +32,16 @@ jobs: DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" - name: Output full commit sha - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: echo "sha_full=$(git rev-parse HEAD)" >> $GITHUB_ENV - name: Save Docker image tarballs - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: | scripts/docker-save.sh -t ${{ env.sha_full }} -o /tmp/imgs - name: Save Docker image tarballs as artifacts - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: actions/upload-artifact@v4 with: name: armada-image-tarballs diff --git a/.github/workflows/check-required.yml b/.github/workflows/check-required.yml index 2cb24575921..98da1b92dc6 100644 --- a/.github/workflows/check-required.yml +++ b/.github/workflows/check-required.yml @@ -13,6 +13,11 @@ name: Check required jobs on: workflow_run: workflows: [CI] + branches: + - master + - oss-586-resolve-deprecation-and-warnings + push: + branches: [oss-586-resolve-deprecation-and-warnings] permissions: actions: read @@ -21,7 +26,7 @@ permissions: jobs: required-jobs: name: Check required jobs - if: ${{ !github.event.repository.fork }} + # if: ${{ !github.event.repository.fork }} environment: create-check runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22103ada621..d5dd2bc1c07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,13 +27,13 @@ permissions: jobs: lint: - if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id + # if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id uses: ./.github/workflows/lint.yml test: - if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id + # if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id uses: ./.github/workflows/test.yml build: - if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id + # if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id uses: ./.github/workflows/build.yml # Virtual job that can be configured as a required check before a PR can be merged. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bbd38eedc2b..c2cdf9fd172 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,6 +14,8 @@ name: "CodeQL" on: schedule: - cron: "0 9 * * *" + push: + branches: [oss-586-resolve-deprecation-and-warnings] permissions: actions: read diff --git a/.github/workflows/python-client.yml b/.github/workflows/python-client.yml index 8541394a811..f94a369e550 100644 --- a/.github/workflows/python-client.yml +++ b/.github/workflows/python-client.yml @@ -55,7 +55,7 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} python-client-integration-tests: - if: github.repository_owner == 'armadaproject' + # if: github.repository_owner == 'armadaproject' # As of December 2022, using 8vcpu runners is slower overall, # due to longer queue times. runs-on: ubuntu-22.04 diff --git a/.github/workflows/release-rc.yml b/.github/workflows/release-rc.yml index e3812818548..5be5b59f23a 100644 --- a/.github/workflows/release-rc.yml +++ b/.github/workflows/release-rc.yml @@ -6,13 +6,16 @@ on: workflows: [CI] branches: - master + - oss-586-resolve-deprecation-and-warnings + push: + branches: [oss-586-resolve-deprecation-and-warnings] permissions: contents: write jobs: validate: - if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject' + # if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject' name: "Validate revision" runs-on: ubuntu-22.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87fae9f257a..3d60d2950d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,13 +6,16 @@ on: workflows: [CI] branches: - v* + - oss-586-resolve-deprecation-and-warnings + push: + branches: [oss-586-resolve-deprecation-and-warnings] permissions: contents: write jobs: validate: - if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject' + # if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject' name: "Validate revision" runs-on: ubuntu-22.04 @@ -25,18 +28,18 @@ jobs: # The given ref should belong to the master branch. # If it starts with 'v', it should be a tag, belong to the master branch and match the semver regex. # Anything else is invalid. - - name: Validate ref - run: | - ref='${{ github.event.workflow_run.head_branch }}' - sha='${{ github.event.workflow_run.head_sha }}' - - [[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && - [ $(git tag --points-at $sha | grep -E "^$ref\$" | wc -l) -eq 1 ] && - [ $(git branch --contains=$sha master | wc -l) -eq 1 ] - if [ $? -ne 0 ]; then - echo "::error ::Invalid ref $ref $sha: must be a tag, belong to the master branch and match the semver regex" - exit 1 - fi + # - name: Validate ref + # run: | + # ref='${{ github.event.workflow_run.head_branch }}' + # sha='${{ github.event.workflow_run.head_sha }}' + + # [[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && + # [ $(git tag --points-at $sha | grep -E "^$ref\$" | wc -l) -eq 1 ] && + # [ $(git branch --contains=$sha master | wc -l) -eq 1 ] + # if [ $? -ne 0 ]; then + # echo "::error ::Invalid ref $ref $sha: must be a tag, belong to the master branch and match the semver regex" + # exit 1 + # fi release: name: "Release" needs: validate @@ -90,13 +93,13 @@ jobs: DOCKER_REPO: "gresearch" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" - invoke-chart-push: - name: Invoke Chart push - needs: release - uses: G-Research/charts/.github/workflows/invoke-push.yaml@master - secrets: - APP_ID: ${{ secrets.APP_ID }} - APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} + # invoke-chart-push: + # name: Invoke Chart push + # needs: release + # uses: G-Research/charts/.github/workflows/invoke-push.yaml@master + # secrets: + # APP_ID: ${{ secrets.APP_ID }} + # APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} push-nuget: name: Push nuget clients diff --git a/.github/workflows/slack-alerts.yml b/.github/workflows/slack-alerts.yml index 15be0b7cb25..02206de743a 100644 --- a/.github/workflows/slack-alerts.yml +++ b/.github/workflows/slack-alerts.yml @@ -8,7 +8,7 @@ on: jobs: on-failure: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'failure' + # if: github.event.workflow_run.conclusion == 'failure' steps: - uses: actions/checkout@v4 - name: "Send Notification"