Run map file analyser through repository dispatch (#2148)
* Add ripository dispatch * Fix mistakes
This commit is contained in:
parent
36e15a1352
commit
5d18b189ec
40
.github/workflows/amap_analyse.yml
vendored
40
.github/workflows/amap_analyse.yml
vendored
@ -1,13 +1,8 @@
|
|||||||
name: 'Analyze .map file with Amap'
|
name: 'Analyze .map file with Amap'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
repository_dispatch:
|
||||||
branches:
|
types: [make_map_analyse]
|
||||||
- dev
|
|
||||||
- "release*"
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TARGETS: f7
|
TARGETS: f7
|
||||||
@ -15,24 +10,9 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
amap_analyse:
|
amap_analyse:
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
|
||||||
runs-on: [self-hosted,FlipperZeroMacShell]
|
runs-on: [self-hosted,FlipperZeroMacShell]
|
||||||
timeout-minutes: 15
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: 'Wait Build workflow'
|
|
||||||
uses: fountainhead/action-wait-for-check@v1.0.0
|
|
||||||
id: wait-for-build
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
checkName: 'main'
|
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
intervalSeconds: 20
|
|
||||||
|
|
||||||
- name: 'Check Build workflow status'
|
|
||||||
if: steps.wait-for-build.outputs.conclusion == 'failure'
|
|
||||||
run: |
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
- name: 'Decontaminate previous build leftovers'
|
- name: 'Decontaminate previous build leftovers'
|
||||||
run: |
|
run: |
|
||||||
if [ -d .git ]; then
|
if [ -d .git ]; then
|
||||||
@ -43,18 +23,6 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
|
|
||||||
- name: 'Get commit details'
|
|
||||||
run: |
|
|
||||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
|
||||||
TYPE="pull"
|
|
||||||
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
|
||||||
TYPE="tag"
|
|
||||||
else
|
|
||||||
TYPE="other"
|
|
||||||
fi
|
|
||||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
|
||||||
|
|
||||||
- name: 'Make artifacts directory'
|
- name: 'Make artifacts directory'
|
||||||
run: |
|
run: |
|
||||||
@ -69,7 +37,7 @@ jobs:
|
|||||||
chmod 600 ./deploy_key;
|
chmod 600 ./deploy_key;
|
||||||
rsync -avzP \
|
rsync -avzP \
|
||||||
-e 'ssh -p ${{ secrets.RSYNC_DEPLOY_PORT }} -i ./deploy_key' \
|
-e 'ssh -p ${{ secrets.RSYNC_DEPLOY_PORT }} -i ./deploy_key' \
|
||||||
${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${BRANCH_NAME}/" artifacts/;
|
${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${{ github.event.client_payload.branch_name }}/" artifacts/;
|
||||||
rm ./deploy_key;
|
rm ./deploy_key;
|
||||||
|
|
||||||
- name: 'Make .map file analyze'
|
- name: 'Make .map file analyze'
|
||||||
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -98,6 +98,14 @@ jobs:
|
|||||||
artifacts/ ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${BRANCH_NAME}/";
|
artifacts/ ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${BRANCH_NAME}/";
|
||||||
rm ./deploy_key;
|
rm ./deploy_key;
|
||||||
|
|
||||||
|
- name: 'Trigger map file analyser'
|
||||||
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
|
uses: peter-evans/repository-dispatch@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
event-type: make_map_analyse
|
||||||
|
client-payload: '{"branch_name": "${{steps.names.outputs.branch_name}}"}'
|
||||||
|
|
||||||
- name: 'Trigger update server reindex'
|
- name: 'Trigger update server reindex'
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
run: curl -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
|
run: curl -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
|
||||||
|
Loading…
Reference in New Issue
Block a user