Fix CI/CD in tags #1703

This commit is contained in:
Max Andreev
2022-09-05 16:40:54 +03:00
committed by GitHub
parent 8d8481b17f
commit b7a6d18186
4 changed files with 30 additions and 17 deletions

View File

@@ -46,12 +46,14 @@ jobs:
- name: 'Get commit details'
run: |
FBT_TOOLCHAIN_PATH=/opt source scripts/toolchain/fbtenv.sh
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--is_pull"
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
python3 scripts/get_env.py "--event_file=${{ github.event_path }}"
TYPE="other"
fi
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
- name: 'Make artifacts directory'
run: |

View File

@@ -36,12 +36,14 @@ jobs:
- name: 'Get commit details'
run: |
FBT_TOOLCHAIN_PATH=/opt source scripts/toolchain/fbtenv.sh
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--is_pull"
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
python3 scripts/get_env.py "--event_file=${{ github.event_path }}"
TYPE="other"
fi
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
- name: 'Generate suffixes for comment'
id: names
@@ -159,14 +161,14 @@ jobs:
- name: 'Get commit details'
run: |
FBT_TOOLCHAIN_PATH=/opt source scripts/toolchain/fbtenv.sh
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--is_pull"
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
python3 scripts/get_env.py "--event_file=${{ github.event_path }}"
TYPE="other"
fi
echo "WORKFLOW_BRANCH_OR_TAG=${BRANCH_NAME}" >> $GITHUB_ENV
echo "DIST_SUFFIX=${SUFFIX}" >> $GITHUB_ENV
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
- name: 'Build the firmware'
run: |

View File

@@ -32,12 +32,14 @@ jobs:
- name: 'Get commit details'
run: |
FBT_TOOLCHAIN_PATH=/opt source scripts/toolchain/fbtenv.sh
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--is_pull"
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
python3 scripts/get_env.py "--event_file=${{ github.event_path }}"
TYPE="other"
fi
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
- name: 'Generate suffixes for comment'
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request }}