Removing GitHub workflows from old release branch
diff --git a/.github/workflows/arm-cd.yml b/.github/workflows/arm-cd.yml
deleted file mode 100644
index 26e9691..0000000
--- a/.github/workflows/arm-cd.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-name: ARM CD
-
-on:
-  push:
-    tags:
-      - v2.**
-  schedule:
-    - cron: '0 8 * * *'
-
-jobs:
-  build:
-    runs-on: [self-hosted, linux, ARM64]
-    strategy:
-      matrix:
-        pyver: ['3.7', '3.8', '3.9', '3.10']
-    steps:
-      - name: Stop old running containers (if any)
-        shell: bash
-        run: |
-          running_containers=$(docker ps -q) && \
-          if [[ $running_containers == "" ]]; then
-            echo "No running containers";
-          else
-            echo "Running container(s) found" && \
-            docker stop $running_containers;
-          fi
-          docker container prune -f
-      - name: Clean repository
-        shell: bash
-        run: find /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/. -name . -o -prune -exec sudo rm -rf -- {} + || true
-      - name: Checkout repository
-        uses: actions/checkout@v3
-      - name: Build and test pip wheel
-        shell: bash
-        run: |
-          CI_DOCKER_BUILD_EXTRA_PARAMS='--build-arg py_major_minor_version=${{ matrix.pyver }}' \
-          ./tensorflow/tools/ci_build/ci_build.sh cpu.arm64 bash tensorflow/tools/ci_build/rel/ubuntu/cpu_arm64_pip.sh
-      - name: Upload pip wheel to PyPI
-        shell: bash
-        run: python3 -m twine upload --verbose /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/whl/* -u "__token__" -p ${{ secrets.AWS_PYPI_ACCOUNT_TOKEN }}
diff --git a/.github/workflows/arm-ci.yml b/.github/workflows/arm-ci.yml
deleted file mode 100644
index 5301881..0000000
--- a/.github/workflows/arm-ci.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-name: ARM CI
-
-on:
-  pull_request:
-    types: [opened, synchronize, reopened]
-    branches:
-      - master
-      - r2.**
-
-jobs:
-  build:
-    runs-on: [self-hosted, linux, ARM64]
-    strategy:
-      matrix:
-        pyver: ['3.10']
-    steps:
-      - name: Stop old running containers (if any)
-        shell: bash
-        run: |
-          running_containers=$(docker ps -q) && \
-          if [[ $running_containers == "" ]]; then
-            echo "No running containers";
-          else
-            echo "Running container(s) found" && \
-            docker stop $running_containers;
-          fi
-          docker container prune -f
-      - name: Clean repository
-        shell: bash
-        run: find /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/. -name . -o -prune -exec sudo rm -rf -- {} + || true
-      - name: Checkout repository
-        uses: actions/checkout@v3
-      - name: Build and test pip wheel
-        shell: bash
-        run: |
-          CI_DOCKER_BUILD_EXTRA_PARAMS='--build-arg py_major_minor_version=${{ matrix.pyver }}' \
-          ./tensorflow/tools/ci_build/ci_build.sh cpu.arm64 bash tensorflow/tools/ci_build/rel/ubuntu/cpu_arm64_pip.sh
-      - name: Upload pip wheel to GitHub
-        uses: actions/upload-artifact@v3
-        with:
-          name: tensorflow_py${{ matrix.pyver }}_wheel
-          path: /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/whl/*.whl
diff --git a/.github/workflows/cffconvert.yml b/.github/workflows/cffconvert.yml
deleted file mode 100644
index a61d022..0000000
--- a/.github/workflows/cffconvert.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-name: cffconvert
-
-on:
-  push:
-    paths:
-      - CITATION.cff
-
-jobs:
-  validate:
-    name: "validate"
-    runs-on: ubuntu-latest
-    steps:
-      - name: Check out a copy of the repository
-        uses: actions/checkout@v2
-
-      - name: Check whether the citation metadata from CITATION.cff is valid
-        uses: citation-file-format/cffconvert-github-action@2.0.0
-        with:
-          args: "--validate"
diff --git a/.github/workflows/create_issue.js b/.github/workflows/create_issue.js
deleted file mode 100644
index eca2095..0000000
--- a/.github/workflows/create_issue.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @license
- * Copyright 2021 Google LLC. All Rights Reserved.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =============================================================================
- */
-
-/** Extracts PR from commit message and creates a GitHub Issue on Rollback of PR
-  Created issue is assigned to original PR owner and reviewer.
-
-  @param {!object}
-    github enables querying for PR and also create issue using rest endpoint
-    context has the commit message details in the payload
-  @return {string} Returns the issue number and title
-*/
-module.exports = async ({github, context}) => {
-  const rollback_commit = context.payload.head_commit.id;
-  const pr_match_groups = context.payload.head_commit.message.match(/\Rollback of PR #(\d+).*/) || [];
-  if (pr_match_groups.length != 2) {
-    console.log(`PR Number not found in ${context.payload.head_commit.message}`);
-    throw "Error extracting PR Number from commit message";
-  }
-  const pr_number = parseInt(pr_match_groups[1]);
-  const owner = context.payload.repository.owner.name;
-  const repo = context.payload.repository.name;
-  console.log(`Original PR: ${pr_number} and Rollback Commit: ${rollback_commit}`);
-  // Get the Original PR Details
-  const pr_resp = await github.rest.pulls.get({
-    owner,
-    repo,
-    pull_number: pr_number
-  });
-  if (pr_resp.status != 200 || pr_resp.data.state != 'closed') {
-    console.log(`PR:{pr_number} is not found or closed.  Not a valid condition to create an issue.`);
-    console.log(pr_resp);
-    throw `PR:{pr_number} needs to be valid and closed (merged)`;
-  }
-  const pr_title = pr_resp.data.title;
-  // Assign to PR owner and reviewers
-  const assignees = pr_resp.data.assignees.concat(pr_resp.data.requested_reviewers);
-  let assignee_logins = assignees.map(x => x.login);
-  assignee_logins.push(pr_resp.data.user.login);
-  console.log(assignee_logins);
-  // Create an new GH Issue and reference the Original PR
-  const resp = await github.rest.issues.create({
-    owner,
-    repo,
-    assignees: assignee_logins,
-    title: `Issue created for Rollback of PR #${pr_number}: ${pr_title}`,
-    body: `Merged PR #${pr_number} is rolled back in ${rollback_commit}.
-    Please follow up with the reviewer and close this issue once its resolved.`
-  });
-  return `Issue created: ${resp.data.number} with Title: ${resp.data.title}`;
-};
diff --git a/.github/workflows/issue-on-pr-rollback.yml b/.github/workflows/issue-on-pr-rollback.yml
deleted file mode 100644
index ce0182b..0000000
--- a/.github/workflows/issue-on-pr-rollback.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-name: Creates a GitHub Issue when a PR Rolled back via Commit to Master
-on:
-  push:
-    branches:
-      - master
-
-jobs:
-  create-issue-on-pr-rollback:
-    runs-on: ubuntu-latest
-    if: |
-      github.repository == 'tensorflow/tensorflow' &&
-      startsWith(github.event.head_commit.message, 'Rollback of PR #')
-    steps:
-      - name: Checkout repo
-        uses: actions/checkout@v2
-      - name: Create a new Github Issue
-        uses: actions/github-script@v5
-        with:
-          github-token: ${{secrets.GITHUB_TOKEN}}
-          script: |
-            const script = require('./.github/workflows/create_issue.js')
-            console.log(await script({github, context}))
diff --git a/.github/workflows/pylint-presubmit.yml b/.github/workflows/pylint-presubmit.yml
deleted file mode 100644
index b469f04..0000000
--- a/.github/workflows/pylint-presubmit.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-name: PyLint
-on:
-  pull_request:
-    paths:
-      - '**.py'
-
-jobs:
-  build:
-    name: PyLint
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-    - name: Get file changes
-      id: get_file_changes
-      uses: trilom/file-changes-action@v1.2.4
-      with:
-        output: ' '
-    - name: Report list of changed files
-      run: |
-        echo Changed files: ${{ steps.get_file_changes.outputs.files }}
-    - name: Set up Python 3.9
-      uses: actions/setup-python@v2
-      with:
-        python-version: "3.9"
-    - name: Install Python dependencies
-      run: |
-        python -m pip install --upgrade pip
-        pip install pylint numpy wheel
-        pip install keras_preprocessing --no-deps
-    - name: Run PyLint on changed files
-      run: |
-        echo "${{ steps.get_file_changes.outputs.files}}" | tr " " "\n" | grep ".py$" | xargs pylint --rcfile=tensorflow/tools/ci_build/pylintrc
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
deleted file mode 100644
index 3694dd0..0000000
--- a/.github/workflows/scorecards-analysis.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============================================================================
-
-name: Scorecards supply-chain security
-on:
-  # Only the default branch is supported.
-  branch_protection_rule:
-  schedule:
-    - cron: '44 15 * * 5'
-  push:
-    branches: [ master ]
-
-# Declare default permissions as read only.
-permissions: read-all
-
-jobs:
-  analysis:
-    if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks
-    name: Scorecards analysis
-    runs-on: ubuntu-latest
-    permissions:
-      # Needed to upload the results to code-scanning dashboard.
-      security-events: write
-      actions: read
-      contents: read
-
-    steps:
-      - name: "Checkout code"
-        uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
-        with:
-          persist-credentials: false
-
-      - name: "Run analysis"
-        uses: ossf/scorecard-action@0fe1afdc40f536c78e3dc69147b91b3ecec2cc8a # v1.0.0
-        with:
-          results_file: results.sarif
-          results_format: sarif
-          # Read-only PAT token. To create it,
-          # follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
-          repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
-          # Publish the results to enable scorecard badges. For more details, see
-          # https://github.com/ossf/scorecard-action#publishing-results.
-          # For private repositories, `publish_results` will automatically be set to `false`,
-          # regardless of the value entered here.
-          publish_results: true
-
-      # Upload the results as artifacts (optional).
-      - name: "Upload artifact"
-        uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1
-        with:
-          name: SARIF file
-          path: results.sarif
-          retention-days: 5
-
-      # Upload the results to GitHub's code scanning dashboard.
-      - name: "Upload to code-scanning"
-        uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
-        with:
-          sarif_file: results.sarif
diff --git a/.github/workflows/update-nightly.yml b/.github/workflows/update-nightly.yml
deleted file mode 100644
index 0265ffb..0000000
--- a/.github/workflows/update-nightly.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============================================================================
-
-on:
-  workflow_dispatch:  # Allow manual triggers
-  schedule:
-    - cron: 0 4 * * *  # 4am UTC is 9pm PDT and 8pm PST
-name: Set nightly branch to master HEAD
-jobs:
-  master-to-nightly:
-    if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks
-    runs-on: ubuntu-latest
-    steps:
-    - uses: zofrex/mirror-branch@v1
-      name: Set nightly branch to master HEAD
-      with:
-        target-branch: 'nightly'
diff --git a/.github/workflows/update-rbe.yml b/.github/workflows/update-rbe.yml
deleted file mode 100644
index 8302612..0000000
--- a/.github/workflows/update-rbe.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ==============================================================================
-
-
-# This Workflow updates tensorflow/tools/toolchains/remote_config/configs.bzl
-# to reference the most recent versions of the SIG Build Docker images.
-name: Update RBE Configs
-on:
-  workflow_dispatch:
-
-jobs:
-  rbe:
-    name: Update RBE Configs
-    runs-on: ubuntu-latest
-    if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks
-    steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-    - name: Update the RBE Configs
-      run: |
-        function map() {
-          # The "digest" that allows us to pull an image is not the digest as
-          # returned by the API, but a sha256sum of the entire chunk of image
-          # metadata. gcr.io helpfully includes it in the header of the response
-          # as docker-content-digest: sha256:[digest]. Note we use egrep to
-          # match exactly sha256:<hash> because curl may include a ^M symbol at
-          # the end of the line.
-          # See https://cloud.google.com/architecture/using-container-images#exploring_image_manifests_digests_and_tags
-          digest=$(curl -s --head "https://gcr.io/v2/tensorflow-sigs/build/manifests/$2" | egrep -o "sha256:[[:alnum:]]*")
-          # Find the line matching the regex "sigbuild-r2.9" (with quotes) and
-          # replace just the digest portion in it
-          sed -i"" "/\"$1\"/ s/sha256:[[:alnum:]]*/$digest/g" tensorflow/tools/toolchains/remote_config/configs.bzl
-        }
-        # See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/toolchains/remote_config/configs.bzl
-        # This is a mapping of name_container_map keys under sigbuild_tf_configs
-        # to tag names on gcr.io/tensorflow-sigs/build.
-        map sigbuild-r2.9 latest-python3.9
-        map sigbuild-r2.9-python3.7 latest-python3.7
-        map sigbuild-r2.9-python3.8 latest-python3.8
-        map sigbuild-r2.9-python3.9 latest-python3.9
-        map sigbuild-r2.9-python3.10 latest-python3.10
-    - name: Create Pull Request with changes
-      uses: peter-evans/create-pull-request@v3
-      with:
-        title: Update the RBE images to the latest container versions
-        committer: TensorFlow Release Automation <jenkins@tensorflow.org>
-        token: ${{ secrets.JENKINS_TOKEN }}
-        reviewers: angerson,mihaimaruseac
-        body: |
-          This PR was created by a GitHub Actions workflow to update all the SIG Build-based RBE containers to the most recent containers. See:
-
-          - https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/toolchains/remote_config/configs.bzl
-          - https://github.com/tensorflow/tensorflow/blob/master/.github/workflows/update-rbe.yml