Revert 4 commits introducing GHA pull_request_target

pull/1652/head
Alexandre Hajjar 2021-07-23 22:44:29 +02:00
parent 7ce21d8766
commit 5dfe3185f4
2 changed files with 16 additions and 20 deletions

View File

@ -1,9 +1,10 @@
name: Déploiement
on:
pull_request:
types: [opened, synchronize]
push:
branches: [master, demo, next]
pull_request_target:
types: [opened, synchronize]
# We display the release notes in the "news" section of mon-entreprise.fr so
# we want to re-deploy the site when a new release is published or edited on
# GitHub.
@ -40,8 +41,6 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
@ -93,7 +92,7 @@ jobs:
enable-commit-comment: false
github-deployment-environment: ${{ needs.deploy-context.outputs.env-name }}
alias: ${{ needs.deploy-context.outputs.env-name }}${{ matrix.site && format('-{0}', matrix.site) }}
deploy-message: ${{ github.event.pull_request_target.title || needs.deploy-context.outputs.env-name }} (${{ matrix.site || 'fr' }})
deploy-message: ${{ github.event.pull_request.title || needs.deploy-context.outputs.env-name }} (${{ matrix.site || 'fr' }})
# Disabled because we create our own customized comment
enable-pull-request-comment: false
@ -129,7 +128,7 @@ jobs:
post-comment:
runs-on: ubuntu-18.04
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request'
needs: [deploy-preview, deploy-context]
steps:
- name: Find Comment
@ -165,7 +164,7 @@ jobs:
fail-fast: false
matrix:
site: ['fr', 'en', 'publicodes']
browser: [electron] # Firefox is very slow…
browser: [electron] # Firefox is very slow…
viewport: [default]
container: [1, 2, 3, 4]
include:
@ -204,7 +203,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
# Custom cache as we do not care about installing all the other dependancies
with:
@ -212,9 +211,9 @@ jobs:
~/.cache/Cypress
node_modules
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: node mon-entreprise/scripts/get-cypress-packages.js | xargs npm i
- name: Test e2e mon-entreprise on preview (site=${{ matrix.site }}, browser=${{ matrix.browser}}, viewport=${{ matrix.viewport }})
uses: cypress-io/github-action@v2
with:
@ -229,7 +228,7 @@ jobs:
parallel: true
group: ${{ matrix.site }}-${{ matrix.browser }}-viewport_${{ matrix.viewport }}
env:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request_target.title }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
e2e-test-production:
env:
@ -244,7 +243,7 @@ jobs:
fail-fast: false
matrix:
site: ['fr', 'en', 'publicodes']
browser: [chrome] # Firefox is very slow…
browser: [chrome] # Firefox is very slow…
viewport: [default, small]
container: [1, 2, 3, 4]
include:
@ -283,7 +282,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
# Custom cache as we do not care about installing all the other dependancies
with:
@ -291,9 +290,9 @@ jobs:
~/.cache/Cypress
node_modules
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: node mon-entreprise/scripts/get-cypress-packages.js | xargs npm i
- name: Test e2e mon-entreprise on production (site=${{ matrix.site }}, browser=${{ matrix.browser}}, viewport=${{ matrix.viewport }})
uses: cypress-io/github-action@v2
with:
@ -308,4 +307,4 @@ jobs:
parallel: true
group: ${{ matrix.site }}-${{ matrix.browser }}-viewport_${{ matrix.viewport }}
env:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request_target.title }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}

View File

@ -1,8 +1,5 @@
name: Tests
on:
push:
pull_request_target:
types: [opened, synchronize]
on: push
jobs:
lint: