Skip to content

Factory

Factory #925

Workflow file for this run

name: Factory
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Dry run'
type: boolean
default: false
required: false
schedule:
- cron: '0 0 * * *'
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
generator:
- fresh-astro-project
- fresh-bun-project
- fresh-next-app-typescript
- fresh-next-app
- fresh-playwright-project
- fresh-react-app-typescript
- fresh-react-app
- fresh-remix-app-vercel
- fresh-remix-app
- fresh-solid-app-ts
- fresh-sveltekit-app-typescript
- fresh-t3-app
- fresh-turbo-monorepo
- fresh-vite-app-lit-element-ts
- fresh-vite-app-lit-element
- fresh-vite-app-preact-ts
- fresh-vite-app-preact
- fresh-vite-app-react-ts
- fresh-vite-app-react
- fresh-vite-app-svelte-ts
- fresh-vite-app-svelte
- fresh-vite-app-ts
- fresh-vite-app-vue-ts
- fresh-vite-app-vue
- fresh-vite-app
- fresh-vitepress-site
- fresh-vscode-extension
- fresh-vscode-web-extension
- fresh-yarn-pnp-project
# Removed from the factory on 2023-03-19 because the generator script fails very often.
# - fresh-redwood-app-typescript
# - fresh-redwood-app
# Removed from the factory on 2021-03-19 because the generator script fails on
# recent Node.js versions and the generator is not maintained anymore
# (no updates since 2020-10-13).
# See: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported)
# - fresh-tsdx-lib
# - fresh-tsdx-react-component-with-storybook
# - fresh-tsdx-react-component
# Removed from the factory on 2021-03-19 because the generator script does not
# support Node.js v18.
# See: https://github.com/microsoft/rushstack/issues/4017
# - fresh-rush-monorepo
env:
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- uses: actions/checkout@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
with:
context: runner
load: true
tags: factory-runner
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Obtain a GitHub App Installation Access Token
id: githubAppAuth
run: |
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.GH_APP_CREDENTIALS_TOKEN }})"
echo "::add-mask::$TOKEN"
echo "::set-output name=token::$TOKEN"
- uses: actions/setup-node@v1
with:
node-version: 16.x
- run: yarn
- run: bin/run ${{ matrix.generator }}
- run: yarn node provision ${{ matrix.generator }}
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: bash sync.sh
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: yarn factory upload-result
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}