From dcc6c9b7f70293017fe6c8088e0fcdfaae992c4f Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Fri, 6 Sep 2024 11:22:24 +0500 Subject: [PATCH] fix: move to ubuntu-latest & ghactions update --- .github/workflows/ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/migrations-mysql8-check.yml | 8 ++++---- .github/workflows/push-docker-image.yml | 14 +++++++------- .github/workflows/trivy-code-scanning.yml | 4 ++-- requirements/constraints.txt | 3 --- 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a43922b..f58c737d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: db-version: ['mysql80'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Start container run: | docker compose -f .ci/docker-compose-ci.yml up -d diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0d678585..b23b0c0c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,17 +21,17 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/migrations-mysql8-check.yml b/.github/workflows/migrations-mysql8-check.yml index c9ef52cd..7c4c8ab6 100644 --- a/.github/workflows/migrations-mysql8-check.yml +++ b/.github/workflows/migrations-mysql8-check.yml @@ -14,15 +14,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-20.04 ] + os: [ ubuntu-latest ] python-version: [ '3.11', '3.12' ] steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -36,7 +36,7 @@ jobs: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: Cache pip dependencies id: cache-dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.pip-cache-dir.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('requirements/pip-tools.txt') }} diff --git a/.github/workflows/push-docker-image.yml b/.github/workflows/push-docker-image.yml index aa09d8c1..2b43886e 100644 --- a/.github/workflows/push-docker-image.yml +++ b/.github/workflows/push-docker-image.yml @@ -12,14 +12,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Use the release name as the image tag if we're building an open release tag. # Examples: if we're building 'open-release/olive.master', tag the image as 'olive.master'. # Otherwise, we must be building from a push to master, so use 'latest'. - name: Get tag name id: get-tag-name - uses: actions/github-script@v5 + uses: actions/github-script@v7 with: script: | const branchName = context.ref.split('/').slice(-1)[0]; @@ -29,19 +29,19 @@ jobs: result-encoding: string - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push Dev Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true @@ -53,7 +53,7 @@ jobs: platforms: linux/amd64,linux/arm64 # - name: Build and push prod Docker image - # uses: docker/build-push-action@v4 + # uses: docker/build-push-action@v6 # with: # push: true # username: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/trivy-code-scanning.yml b/.github/workflows/trivy-code-scanning.yml index 0cfd011f..36d13adb 100644 --- a/.github/workflows/trivy-code-scanning.yml +++ b/.github/workflows/trivy-code-scanning.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -29,6 +29,6 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v1 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 82a8b526..c26de26f 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -21,6 +21,3 @@ python-dateutil==2.4.0 more-itertools==5.0.0 pylint==1.5.0 django-cors-headers==3.14.0 - - -backports-zoneinfo==0.2.1; python_version < '3.9'