-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (45 loc) · 1.61 KB
/
mkrepo.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
name: Make repositories
on:
workflow_dispatch:
workflow_run:
workflows: ["Build extensions"]
branches:
- main
types:
- completed
jobs:
mkrepo:
name: Make repository
runs-on: ubuntu-latest
timeout-minutes: 20
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
stack:
- heroku-20
- heroku-22
env:
S3_BUCKET: heroku-php-extensions
BUILDPACK: ./vendor/heroku/heroku-buildpack-php
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Composer Install
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
- name: Copy requirements
run: cp ${BUILDPACK}/requirements.txt .
- name: Build Dockerfile
run: |
cat ${BUILDPACK}/support/build/_docker/${{ matrix.stack }}.Dockerfile > docker/build/${{ matrix.stack }}.Dockerfile
cat docker/${{ matrix.stack }}.Dockerfile >> docker/build/${{ matrix.stack }}.Dockerfile
- name: Docker build
run: docker build --pull --tag ${{ matrix.stack }} --file docker/build/${{ matrix.stack }}.Dockerfile .
- name: Make and upload repository
shell: 'script -q -e -c "bash {0}"'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
docker run --rm -ti \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} mkrepo.sh --upload