-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.41 KB
/
ci.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
on:
pull_request:
branches:
- main
push:
branches:
- main
name: CI
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
steps:
- uses: actions/checkout@v3
with:
show-progress: false
- uses: php-actions/composer@v6
- name: Install docker-compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: '2.24.0'
- name: Information
run: |
docker-compose --version
# github.ref_name is the branch name on branch builds.
# On PRs ref_name is `PR#/merge`.
- name: Set runner name
if: github.event_name != 'pull_request'
run: echo "ASH_NAME=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Set runner name
if: github.event_name == 'pull_request'
run: echo "ASH_NAME=pr${{ github.event.number }}" >> "$GITHUB_ENV"
- name: Set variables
run: |
echo "ash_github_runners:
- repo_url: ${{ github.repositoryUrl }}
runner_token: ${{ secrets.RUNNER_TOKEN }}
runner_name: ${{ env.ASH_NAME }}
runner_labels: ci,ash
user: platform
" > vars.ci.yml
cat vars.ci.yml
- name: Build Platform
run: composer dev:start -- --extra-vars=@/usr/share/ash/vars.ci.yml