Skip to content

Commit

Permalink
Adjust names and tags of Github package action
Browse files Browse the repository at this point in the history
  • Loading branch information
frno7 committed May 1, 2022
1 parent ba0344b commit aa044f1
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI-compile
name: Compile and publish the Linux kernel and initramfs archive

on:
push:
Expand All @@ -11,42 +11,46 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Compile project
- name: Package tag
run: |
echo "PACKAGE_TAG=${GITHUB_REF_NAME}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Compile the kernel and initramfs archive
env:
INSTALL_MOD_PATH: ../initramfs/ps2/
INSTALL_MOD_PATH: /srv/initramfs/ps2
INSTALL_MOD_STRIP: 1
run: |
mv -f /srv/initramfs ../
make -j $(getconf _NPROCESSORS_ONLN) ps2_defconfig
sed -i '/^CONFIG_INITRAMFS_SOURCE=/s#=.*$#=/srv/initramfs/ps2#' .config
make -j $(getconf _NPROCESSORS_ONLN) oldconfig
make -j $(getconf _NPROCESSORS_ONLN) vmlinux
make -j $(getconf _NPROCESSORS_ONLN) modules
make -j $(getconf _NPROCESSORS_ONLN) modules_install
make -j $(getconf _NPROCESSORS_ONLN) vmlinuz
cp vmlinuz PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF
ln vmlinuz vmlinuz-${{ env.PACKAGE_TAG }}.elf
- name: Upload kernel as artifact
- name: Publish the kernel
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: "PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF"
path: PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF
name: "vmlinuz-${{ env.PACKAGE_TAG }}"
path: vmlinuz-${{ env.PACKAGE_TAG }}.elf

- name: Upload initramfs as artifact
- name: Publish the initramfs archive
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: Initramfs
name: "initramfs-${{ env.PACKAGE_TAG }}"
path: usr/initramfs_data.cpio*

- name: Upload kernel as pre-release
if: github.ref == 'refs/heads/ps2-main'
- name: Publish the kernel and initramfs archive as a prerelease package
if: ${{ success() && github.ref == 'refs/heads/ps2-main' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: Development build
automatic_release_tag: "${{ github.ref_name }}-package"
title: Linux kernel and initramfs archive package
files: |
PS2Linux-${{ github.ref_name }}-${{ github.sha }}.ELF
vmlinuz-${{ env.PACKAGE_TAG }}.elf
usr/initramfs_data.cpio*

0 comments on commit aa044f1

Please sign in to comment.