Skip to content

ci: change base path #65

ci: change base path

ci: change base path #65

Workflow file for this run

name: ci
run-name: "ci: ${{ github.event.pull_request.title }}"
on:
pull_request:
paths:
- projects/**/*
- .github/workflows/ci.yml
concurrency:
group: ci/${{ github.event.pull_request.head.ref }}
cancel-in-progress: true
jobs:
plan:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.process-diff.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- run: |
sudo apt-get update
sudo apt-get install -y ca-certificates
- run: go install github.com/machbase/neo-pkgdev@e9705703a7aefb503708b20170220c4541549d5f
- uses: technote-space/get-diff-action@v6
id: get-diff
with:
PATTERNS: projects/**/package.yml
- name: ProcessDiff
id: process-diff
run: |
if [ -n "${{ steps.get-diff.outputs.diff }}" ]; then
for x in ${{ steps.get-diff.outputs.diff }}; do
y=$(echo $x | sed 's#projects/\(.*\)/[^/]*#\1#')
RESULT="$RESULT ${y//$'\n'/}"
done
else
RESULT="neo-pkg-web-example"
fi
neo-pkgdev plan $RESULT
- run: echo '${{ steps.process-diff.outputs.matrix }}' | jq
build:
needs: plan
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.plan.outputs.matrix) }}
runs-on: ${{ matrix.platform.os }}
container: ${{ matrix.platform.container }}
name: ${{ matrix.pkg }} ${{ matrix.platform.name }}
env:
PKGS_PATH: ${{ github.workspace }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- uses: actions/setup-node@v4
if: ${{ startsWith(matrix.platform.container, 'ubuntu')}}
with:
node-version: '20'
- name: prep-ubuntu
if: ${{ startsWith(matrix.platform.container, 'ubuntu')}}
run: |
apt-get update
apt-get install -y ca-certificates wget
mkdir /tmp/pkgs
- name: prep-darwin
if: ${{ startsWith(matrix.platform.container, 'darwin')}}
run: |
mkdir /tmp/pkgs
- run: |
go install github.com/machbase/neo-pkgdev@e9705703a7aefb503708b20170220c4541549d5f
- name: audit
run: neo-pkgdev audit ${{ matrix.pkg }}
- name: build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.P_PKGS_S3_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.P_PKGS_S3_SECRET }}
run: neo-pkgdev build ${{ matrix.pkg }}