mbp-ubuntu/.github/workflows/CI.yml

136 lines
4.3 KiB
YAML
Raw Normal View History

2021-07-23 19:37:26 -04:00
---
2022-12-20 04:31:25 -05:00
name: CI
2021-07-23 19:37:26 -04:00
# yamllint disable-line rule:truthy
on:
2023-02-07 17:46:28 -05:00
[push, workflow_dispatch]
jobs:
2023-04-24 07:52:49 -04:00
Mainline:
2022-11-07 06:01:35 -05:00
runs-on: ubuntu-22.04
steps:
2024-04-25 01:33:25 -04:00
- name: 'Checkout LTS Repo'
uses: actions/checkout@v4
2022-11-07 06:01:35 -05:00
- name: Get version
run: |
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo "ver=${VERSION}" >> $GITHUB_ENV
echo "release=${REL}" >> $GITHUB_ENV
2023-04-24 07:47:20 -04:00
- name: 'Checkout mainline Repo'
uses: actions/checkout@v4
2022-11-07 06:01:35 -05:00
with:
2023-04-24 07:47:20 -04:00
ref: mainline
2022-11-07 06:01:35 -05:00
persist-credentials: false
2023-04-24 07:47:20 -04:00
- name: 'Push new version to mainline'
2022-11-07 06:01:35 -05:00
id: publish
run: |
sed -i "s/KERNEL_VERSION=6.*/KERNEL_VERSION=${{ env.ver }}/g" build.sh
sed -i "s/PKGREL=.*/PKGREL=${{ env.release }}/g" build.sh
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "${{ env.ver }}-${{ env.release }}" -a
- name: Push changes to the repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT }}
2023-04-24 07:47:20 -04:00
branch: mainline
2022-11-07 06:01:35 -05:00
2023-07-15 15:22:54 -04:00
Kubuntu:
runs-on: ubuntu-22.04
steps:
2024-04-25 01:33:25 -04:00
- name: 'Checkout LTS Repo'
uses: actions/checkout@v4
2023-07-15 15:22:54 -04:00
- name: Get version
run: |
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo "ver=${VERSION}" >> $GITHUB_ENV
echo "release=${REL}" >> $GITHUB_ENV
2024-04-25 01:33:25 -04:00
- name: 'Checkout kubuntuLTS Repo'
uses: actions/checkout@v4
2023-07-15 15:22:54 -04:00
with:
2024-04-25 01:33:25 -04:00
ref: kubuntuLTS
2023-07-15 15:22:54 -04:00
persist-credentials: false
2024-04-25 01:33:25 -04:00
- name: 'Push new version to kubuntuLTS'
2023-07-15 15:22:54 -04:00
id: publish
run: |
sed -i "s/KERNEL_VERSION=6.*/KERNEL_VERSION=${{ env.ver }}/g" build.sh
sed -i "s/PKGREL=.*/PKGREL=${{ env.release }}/g" build.sh
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "${{ env.ver }}-${{ env.release }}" -a
- name: Push changes to the repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT }}
2024-04-25 01:33:25 -04:00
branch: kubuntuLTS
2023-07-15 15:22:54 -04:00
ISO:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
2022-10-18 16:36:22 -04:00
- name: Build
2023-03-02 08:19:12 -05:00
run: sudo ./build_in_docker.sh
- name: print sha256sum
2023-05-22 10:54:19 -04:00
run: cat output/sha256*
2021-07-23 19:37:26 -04:00
- name: Generate Tag
id: tag
run: |
VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo Version is $VER
2022-10-18 12:34:10 -04:00
echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
2021-07-23 19:37:26 -04:00
- name: Upload iso artifact
uses: actions/upload-artifact@v4
with:
name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z01
2021-07-23 19:37:26 -04:00
path: ${{ github.workspace }}/output/*
- name: Instructions for putting it back together
2021-07-10 05:48:02 -04:00
run: |
2021-07-23 19:37:26 -04:00
cat << EOF
Download all the artifacts, and put them in a folder
without other files. Then run:"
unzip "*.z??.zip"
2022-10-18 12:34:10 -04:00
cat livecd-${{ env.isotag }}-t2.z?? > cd.zip
2021-07-10 05:48:02 -04:00
echo unzip cd.zip
2021-07-23 19:37:26 -04:00
EOF
2021-11-20 03:20:16 -05:00
2023-03-06 08:27:19 -05:00
- name: Compress ISO
run: |
cd ${{ github.workspace }}
mkdir ISO
mv ${{ github.workspace }}/*.iso ${{ github.workspace }}/ISO
cd ISO
ISONAME=$(ls ${{ github.workspace }}/ISO | grep .iso | rev | cut -c 5- | rev)
2023-03-06 09:21:04 -05:00
tar -czvf ${ISONAME}.tar.gz ${ISONAME}.iso
2023-03-06 08:27:19 -05:00
ls -l
2023-06-03 04:35:25 -04:00
- name: Get the ISO script
run: |
2023-06-03 05:02:47 -04:00
sudo cp ${{ github.workspace }}/.github/workflows/iso.sh ${{ github.workspace }}/output/iso.sh
2023-06-03 04:35:25 -04:00
2021-07-23 19:37:26 -04:00
- name: Release
2024-04-25 01:33:25 -04:00
if: github.ref == 'refs/heads/LTS'
uses: softprops/action-gh-release@v2
2021-07-23 19:37:26 -04:00
with:
2023-05-03 03:07:49 -04:00
#files: ${{ github.workspace }}/ISO/*.tar.gz
2023-05-22 09:02:18 -04:00
#files: ${{ github.workspace }}/ISO/*.iso
files: ${{ github.workspace }}/output/*
2022-11-08 01:18:06 -05:00
tag_name: v${{ env.isotag }}
2022-08-23 08:41:29 -04:00
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
2021-11-20 03:20:43 -05:00
draft: false
2022-07-01 08:51:17 -04:00
prerelease: false
2021-07-23 19:37:26 -04:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}