Skip to content

rel4-kernel-update-event #4

rel4-kernel-update-event

rel4-kernel-update-event #4

Workflow file for this run

name: Monitor Rel4 Kernel Update
on:
repository_dispatch:
types: [rel4-kernel-update-event]
workflow_dispatch:
jobs:
Make-Rel4-Kernel-Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Check if tag already exists
id: check_tag
run: |
tag="rel4-nomcs-release-${{ steps.date.outputs.date }}"
if git ls-remote --tags origin | grep -q "refs/tags/$tag"; then
echo "Tag $tag already exists. Exiting."
exit 0
fi
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
path: ~/.rustup/toolchains/nightly-2024-08-01-x86_64-unknown-linux-gnu
key: ${{ runner.os }}-rustup-nightly-2024-08-01
restore-keys: |
${{ runner.os }}-rustup-nightly-2024-08-01
- name: Install Rust toolchain
run: |
rustup toolchain install nightly-2024-08-01
rustup component add rust-src --toolchain nightly-2024-08-01
rustup default nightly-2024-08-01
- name: Build Environments
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
- name: Add Docker GPG Key and Repository
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
- name: Build Docker Image
run: curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rel4team/build-scripts/refs/heads/mi_dev/scripts/start_docker.sh | bash -s -- .
- name: Build files in the container
run: docker exec -u ${USER} rel4_dev bash ./build.sh
- name: Create Release
uses: elgohr/Github-Release-Action@v5
env:
GH_TOKEN: ${{ secrets.PAT_FOR_REL4 }}
with:
title: "New release"
tag: rel4-nomcs-release-${{ steps.date.outputs.date }}
workdir: build
- name: Compress Tar Folder
run: tar cvzf reL4.tar.gz build/reL4
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: rel4-nomcs-release-${{ steps.date.outputs.date }}
files: |
reL4.tar.gz