s2e: add package #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vulcano | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
pull_request_target: | |
types: [opened, reopened, edited, synchronize, ready_for_review] | |
paths: | |
- 'packages/**/PKGBUILD' | |
jobs: | |
labeling: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Labeling | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: '1.has: package' | |
pkgcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pkgcheck-arch | |
- name: Check Styling | |
run: | | |
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' ')) | |
for FILE in "${CHANGED_FILES[@]}"; do | |
if [[ $(basename "$FILE") == "PKGBUILD" ]]; then | |
echo "Validating $FILE..." | |
pkgcheck "$FILE" | |
fi | |
done | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- name: Build Package | |
run: | | |
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' ')) | |
for FILE in "${CHANGED_FILES[@]}"; do | |
if [[ $(basename "$FILE") == "PKGBUILD" ]]; then | |
echo "Building $FILE..." | |
podman build --load -t builder -f vulcano/Dockerfile $(dirname $FILE) | |
podman run --rm builder | |
fi | |
done |