mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-29 03:43:04 +01:00
Add .github/workflows/actions.lock, generated by gh actions-lock. It records the commit for every action the workflows use, including actions called by other actions. Workflows now reference release tags and the lockfile holds the commit that runs. Verify the lockfile in the Workflow lint job so a workflow change that skips regenerating it fails the pull request. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
name: Test and Deploy installer
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
paths:
|
|
- 'tools/install.sh'
|
|
- '.github/workflows/installer/**'
|
|
- '.github/workflows/installer.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read # to checkout
|
|
|
|
jobs:
|
|
test:
|
|
name: Test installer
|
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 15
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@v2.23.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Set up git repository
|
|
uses: actions/checkout@v7.0.1
|
|
- name: Install zsh
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update; sudo apt-get install zsh
|
|
- name: Test installer
|
|
run: sh ./tools/install.sh
|
|
|
|
deploy:
|
|
name: Deploy installer in install.ohmyz.sh
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
environment: vercel
|
|
needs:
|
|
- test
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@v2.23.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v7.1.0
|
|
with:
|
|
node-version: "24"
|
|
package-manager-cache: false
|
|
- name: Install Vercel CLI
|
|
working-directory: .github/workflows/installer
|
|
run: npm ci --ignore-scripts --no-audit --no-fund
|
|
- name: Setup project and deploy
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
run: |
|
|
cp tools/install.sh .github/workflows/installer/install.sh
|
|
cd .github/workflows/installer
|
|
./node_modules/.bin/vercel deploy --prod -t "$VERCEL_TOKEN"
|