diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/CODEOWNERS | 2 | ||||
-rw-r--r-- | .github/workflows/installer.yml | 54 | ||||
-rw-r--r-- | .github/workflows/installer/.gitignore | 1 | ||||
-rw-r--r-- | .github/workflows/installer/.vercelignore | 2 | ||||
-rw-r--r-- | .github/workflows/installer/vercel.json | 23 | ||||
-rw-r--r-- | .github/workflows/main.yml | 8 |
6 files changed, 83 insertions, 7 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6668cd7ce..0c5f3acee 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,3 +9,5 @@ plugins/shell-proxy/ @septs plugins/universalarchive/ @Konfekt plugins/wp-cli/ @joshmedeski plugins/zoxide/ @ajeetdsouza +plugins/starship/ @axieax +plugins/dbt/ @msempere diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml new file mode 100644 index 000000000..a70c483d1 --- /dev/null +++ b/.github/workflows/installer.yml @@ -0,0 +1,54 @@ +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 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + steps: + - name: Set up git repository + uses: actions/checkout@v3 + - 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 + environment: vercel + needs: + - test + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install Vercel CLI + run: npm install -g vercel + - name: Setup project and deploy + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + run: | + cp tools/install.sh .github/workflows/installer/install.sh + cd .github/workflows/installer + vc deploy --prod -t ${{ secrets.VERCEL_TOKEN }} diff --git a/.github/workflows/installer/.gitignore b/.github/workflows/installer/.gitignore new file mode 100644 index 000000000..f66fce310 --- /dev/null +++ b/.github/workflows/installer/.gitignore @@ -0,0 +1 @@ +install.sh diff --git a/.github/workflows/installer/.vercelignore b/.github/workflows/installer/.vercelignore new file mode 100644 index 000000000..41b233364 --- /dev/null +++ b/.github/workflows/installer/.vercelignore @@ -0,0 +1,2 @@ +/* +!/install.sh diff --git a/.github/workflows/installer/vercel.json b/.github/workflows/installer/vercel.json new file mode 100644 index 000000000..524dc3c0f --- /dev/null +++ b/.github/workflows/installer/vercel.json @@ -0,0 +1,23 @@ +{ + "headers": [ + { + "source": "/((?!favicon.ico).*)", + "headers": [ + { + "key": "Content-Type", + "value": "text/plain" + }, + { + "key": "Content-Disposition", + "value": "inline; filename=\"install.sh\"" + } + ] + } + ], + "rewrites": [ + { + "source": "/((?!favicon.ico|install.sh).*)", + "destination": "/install.sh" + } + ] +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ee2df3d8..de7d98262 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,19 +20,13 @@ permissions: jobs: tests: name: Run tests - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest if: github.repository == 'ohmyzsh/ohmyzsh' - strategy: - matrix: - os: [ubuntu-latest, macos-latest] steps: - name: Set up git repository uses: actions/checkout@v3 - 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 - name: Check syntax run: | for file in ./oh-my-zsh.sh \ |