mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
62 lines
2.6 KiB
YAML
62 lines
2.6 KiB
YAML
name: pullpreview
|
|
|
|
concurrency: ${{ github.ref }}
|
|
|
|
on:
|
|
schedule:
|
|
# this is used to make sure no dangling resources are left
|
|
- cron: "30 2 * * *"
|
|
pull_request:
|
|
types: [labeled, unlabeled, synchronize, closed, reopened]
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
deploy:
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
deployments: write # to delete deployments
|
|
pull-requests: write # to remove labels
|
|
statuses: write # to create commit status
|
|
|
|
if: github.repository_owner == 'opf' && ( github.event_name == 'schedule' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview') )
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Generate .env.pullpreview file
|
|
run: |
|
|
echo "OPENPROJECT_SEED_ADMIN_USER_PASSWORD_RESET=false" >> .env.pullpreview
|
|
echo "OPENPROJECT_SHOW__SETTING__MISMATCH__WARNING=false" >> .env.pullpreview
|
|
echo "OPENPROJECT_FEATURE__STORAGES__MODULE__ACTIVE=true" >> .env.pullpreview
|
|
echo "OPENPROJECT_FEATURE__SHOW__CHANGES__ACTIVE=true" >> .env.pullpreview
|
|
echo "OPENPROJECT_LOOKBOOK__ENABLED=true" >> .env.pullpreview
|
|
echo "OPENPROJECT_HSTS=false" >> .env.pullpreview
|
|
echo "OPENPROJECT_NOTIFICATIONS_POLLING_INTERVAL=10000" >> .env.pullpreview
|
|
echo "OPENPROJECT_ENTERPRISE__CHARGEBEE__SITE=openproject-enterprise-test" >> .env.pullpreview
|
|
echo "OPENPROJECT_ENTERPRISE__TRIAL__CREATION__HOST=https://start.openproject-edge.com" >> .env.pullpreview
|
|
echo "OPENPROJECT_FEATURE_BLOCK_NOTE_EDITOR=true" >> .env.pullpreview
|
|
- name: Boot as BIM edition
|
|
if: contains(github.ref, 'bim/') || contains(github.head_ref, 'bim/')
|
|
run: |
|
|
echo "OPENPROJECT_EDITION=bim" >> .env.pullpreview
|
|
- name: Prepare docker-compose files
|
|
run: |
|
|
cp ./docker/pullpreview/docker-compose.yml ./docker-compose.pullpreview.yml
|
|
cp ./docker/prod/Dockerfile ./Dockerfile
|
|
- uses: pullpreview/action@v5
|
|
with:
|
|
# allows to ssh to the instance using our GitHub ssh key
|
|
# command like: ssh ec2-user@pr-19375-trial-ip-3-127-219-135.my.preview.run
|
|
admins: crohr,HDinger,machisuji,oliverguenther,ulferts,wielinde,cbliard
|
|
compose_files: docker-compose.pullpreview.yml
|
|
instance_type: xlarge
|
|
ports: 80,443,8080
|
|
default_port: 443
|
|
ttl: 10d
|
|
env:
|
|
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
|
|
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
|
|
AWS_REGION: eu-central-1
|