Skip to content

Mainline Kernel update script package #36

Mainline Kernel update script package

Mainline Kernel update script package #36

Workflow file for this run

---
name: Mainline Kernel update script package
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v3
- name: Configure GPG Key
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Get the kernel upgrade script
id: publish
run: |
git clone -b script https://github.com/t2linux/T2-Ubuntu-Kernel.git
chmod 755 ${{ github.workspace }}/T2-Ubuntu-Kernel/t2-kernel-script/DEBIAN/postinst
version=$(cat ${{ github.workspace }}/T2-Ubuntu-Kernel/t2-kernel-script/DEBIAN/control | grep Version | cut -d ':' -f 2 | xargs)
echo "ver=${version}" >> $GITHUB_ENV
cd ${{ github.workspace }}/T2-Ubuntu-Kernel
dpkg-deb --build --root-owner-group t2-kernel-script
cd ${{ github.workspace }}
git clone https://github.com/AdityaGarg8/t2-ubuntu-repo.git
cp -r ${{ github.workspace }}/T2-Ubuntu-Kernel/t2-kernel-script.deb ${{ github.workspace }}/t2-ubuntu-repo
cd ${{ github.workspace }}/t2-ubuntu-repo
# Packages & Packages.gz
dpkg-scanpackages --multiversion . > Packages
gzip -k -f Packages
# Release, Release.gpg & InRelease
apt-ftparchive release . > Release
gpg --default-key "${GPG_SIGNING_EMAIL}" -abs -o - Release > Release.gpg
gpg --default-key "${GPG_SIGNING_EMAIL}" --clearsign -o - Release > InRelease
cd ${{ github.workspace }}
env:
GPG_SIGNING_EMAIL: ${{ secrets.GPG_SIGNING_EMAIL }}
- name: Publish
if: github.ref == 'refs/heads/Mainline'
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 't2-ubuntu-repo'
destination-github-username: 'AdityaGarg8'
destination-repository-name: 't2-ubuntu-repo'
user-email: github-actions[bot]@users.noreply.github.com
user-name: github-actions[bot]
target-branch: main
commit-message: Update Mainline kernel update script to v${{ env.ver }}