From 60ab0ac4effe1aa14dd6f8ae098dc4cd92947f17 Mon Sep 17 00:00:00 2001 From: Calvin Walton Date: Wed, 11 Dec 2024 14:48:54 -0500 Subject: [PATCH] Update github actions --- .github/workflows/codeql.yml | 10 ++-- .github/workflows/package.yml | 81 +++---------------------------- .github/workflows/test-report.yml | 9 ++-- .github/workflows/test.yml | 8 +-- 4 files changed, 20 insertions(+), 88 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 124956b..fcc29c5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -32,15 +32,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install system dependencies run: | sudo apt-get update - DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 + DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 libcairo2-dev - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.8" cache: pip @@ -56,12 +56,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} setup-python-dependencies: false - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index d00c84b..5379594 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -36,7 +36,7 @@ jobs: DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends debhelper devscripts equivs git git-buildpackage pristine-tar - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source fetch-depth: 0 @@ -68,76 +68,14 @@ jobs: ls .. - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ubuntu-${{ matrix.UBUNTU_VERSION }} path: "*.deb" - amazonlinux-2: - runs-on: ubuntu-latest - container: amazonlinux:2 - defaults: - run: - shell: bash - steps: - - name: Install Python and package build dependencies - run: | - amazon-linux-extras enable python3.8 ruby3.0 - yum clean metadata - yum install -y \ - python38 python38-devel python38-wheel \ - git gcc make \ - cairo-gobject-devel gobject-introspection-devel \ - ruby ruby-devel ruby-irb rubygem-rake rubygem-json rubygems \ - rpm-build - pip3.8 install virtualenv-tools3 - gem install --no-document fpm - - - name: Checkout source code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - path: bbb-presentation-video - - - name: Build and install package to image directory - run: | - python3.8 -m venv bbb-presentation-video-image/opt/bbb-presentation-video - bbb-presentation-video-image/opt/bbb-presentation-video/bin/python -m pip install ./bbb-presentation-video -c ./bbb-presentation-video/constraints-amazonlinux-2.txt - virtualenv-tools --update-path /opt/bbb-presentation-video bbb-presentation-video-image/opt/bbb-presentation-video - mkdir -pv bbb-presentation-video-image/usr/bin - ln -sv /opt/bbb-presentation-video/bin/bbb-presentation-video bbb-presentation-video-image/usr/bin - - - name: Use fpm to build rpm package - run: | - pushd bbb-presentation-video - eval "$(./dch_version.sh)" - popd - fpm --verbose \ - --name bbb-presentation-video \ - --input-type dir \ - --chdir bbb-presentation-video-image \ - --output-type rpm \ - --version "${DCH_VERSION}" \ - --rpm-dist amzn2 \ - --rpm-autoreqprov \ - --depends python3.8 \ - --depends gobject-introspection \ - --depends poppler-glib \ - --depends gdk-pixbuf2 \ - --depends gtk3 \ - --depends pango \ - --depends liberation-fonts \ - --depends ffmpeg \ - . - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: amazonlinux-2 - path: "*.rpm" - assets: name: "Upload assets to release" - needs: [ ubuntu, amazonlinux-2 ] + needs: [ ubuntu ] runs-on: ubuntu-latest if: ${{ github.ref_type == 'tag' }} permissions: @@ -145,21 +83,16 @@ jobs: actions: read steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ubuntu-20.04 path: ubuntu-20.04 - - uses: actions/download-artifact@v3 - with: - name: amazonlinux-2 - path: amazonlinux-2 - - name: Create release asset archives run: | - for asset in ubuntu-20.04 amazonlinux-2 ; do + for asset in ubuntu-20.04 ; do zip --junk-paths --recurse-paths --compression-method store "${asset}.zip" "${asset}" done @@ -167,6 +100,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - for asset in ubuntu-20.04 amazonlinux-2 ; do + for asset in ubuntu-20.04 ; do gh release upload ${{ github.ref_name }} "${asset}.zip" done diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 7979f98..c087a36 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -14,16 +14,15 @@ jobs: steps: - name: Download test results - uses: dawidd6/action-download-artifact@v2 + uses: actions/download-artifact@v4 with: name: junit path: junit/ - workflow: ${{ github.event.workflow.id }} - workflow_conclusion: "" - run_id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} - name: Publish test report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v5 with: commit: ${{ github.event.workflow_run.head_sha }} report_paths: junit/**.xml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba30741..64ac50b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,15 +28,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install system dependencies run: | sudo apt-get update - DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 + DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 libcairo2-dev - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: pip @@ -64,7 +64,7 @@ jobs: - name: Upload test results if: ${{ success() || failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: junit path: junit/