forked from fresh-app/factory
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 1.99 KB
/
manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Factory (manual)
run-name: ${{ inputs.generator }}${{ inputs.dry-run && ' (dry-run)' || '' }}
on:
workflow_dispatch:
inputs:
generator:
description: 'The generator to run'
required: true
dry-run:
description: 'Dry run'
type: boolean
default: false
required: false
jobs:
build:
permissions: write-all
timeout-minutes: 15
runs-on: ubuntu-latest
env:
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v2
with:
context: runner
load: true
tags: factory-runner
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: docker/build-push-action@v2
with:
context: screenshotter
load: true
tags: factory-screenshotter
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: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: '20'
- run: pnpm install
- run: bin/run ${{ github.event.inputs.generator }}
- run: node provision ${{ github.event.inputs.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: pnpm factory upload-result
# if: '!inputs.dry-run'
# env:
# GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}