Skip to content

build

build #10

Workflow file for this run

name: Build
on:
repository_dispatch:
types: [build]
env:
ALLOWED_REPOS: >-
[
"cover-router",
"dummy-app",
"frontend-next",
"frontend-react"
]
ALLOWED_BRANCHES: '["dev", "master"]'
TARGET_REPO: ${{ github.event.client_payload.repo || 'none' }}
TARGET_BRANCH: ${{ github.event.client_payload.branch || 'none' }}
jobs:
build:
runs-on: ubuntu-22.04
environment: production
timeout-minutes: 5
steps:
- name: Check repos
if: ${{ contains(fromJSON(env.ALLOWED_REPOS), env.TARGET_REPO) }}
run: echo OK
- name: Check branch
if: ${{ contains(fromJSON(env.ALLOWED_BRANCHES), env.TARGET_BRANCH) }}
run: echo OK
- name: Create deployooor app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.DEPLOYER_APP_ID }}
private-key: ${{ secrets.DEPLOYER_APP_PK }}
owner: ${{ github.repository_owner }}
repositories: ${{ env.TARGET_REPO }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/${{ env.TARGET_REPO }}
ref: ${{ env.TARGET_BRANCH }}
path: code
- name: ls
run: ls -la code