From b3949463dfd46f6f1464193ff61dae29a9a5b415 Mon Sep 17 00:00:00 2001 From: Ivan-lis Date: Fri, 18 Oct 2024 07:36:50 +0000 Subject: [PATCH] CI: Added repo downloading --- .forgejo/workflows/pr_check.yaml | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .forgejo/workflows/pr_check.yaml diff --git a/.forgejo/workflows/pr_check.yaml b/.forgejo/workflows/pr_check.yaml new file mode 100644 index 0000000..3489167 --- /dev/null +++ b/.forgejo/workflows/pr_check.yaml @@ -0,0 +1,48 @@ +name: PR Check +run-name: ${{ github.actor }} is testing +on: [push] +jobs: + on-push-commit-check: + runs-on: archlinux-latest + steps: + - name: Setup environment + shell: sh + run: | + pacman -Syyu --noconfirm + pacman -S --noconfirm git less vim sudo python-pip wget which pkgconf nodejs-lts-iron + pacman -S --noconfirm cmake make gcc ninja meson + pacman -S --noconfirm gtk4 gtkmm-4.0 boost spdlog fmt libxml++-5.0 + + - name: List CI environment variables + run: | + echo "Runner OS: ${{ runner.os }}" + echo "Job triggered event: ${{ github.event_name }}" + echo "Repository name: ${{ github.repository }}" + echo "Workspace path: ${{ github.workspace }}" + echo "Actor: ${{ github.actor }}" + echo "Ref: ${{ github.ref }}" + echo "Ref name: ${{ github.ref_name }}" + echo "SHA: ${{ github.sha }}" + + - name: Check out repository code + run: | + export GIT_TERMINAL_PROMPT=0 + mkdir -p ${{ github.workspace }} + cd ${{ github.workspace }} + + echo "Configure project settings and remote credentials" + git init + git config credential.helper store + git remote add origin https://${{ github.token }}@helicopter.myftp.org/git/Larra/larra + + echo "Fetch repo state on pushed commit" + git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +${{ github.sha }}:${{ github.ref }} + + echo "Checkout to fetched repo state" + git checkout ${{ github.ref }} + + - name: Show repo content + run: | + echo "github.workspace content" + ls -la ${{ github.workspace }} + echo "This job's status is ${{ job.status }}."