Skip to content

Commit

Permalink
Refactor workflow trigger (#28731)
Browse files Browse the repository at this point in the history
* Automated Change

* Automated Change

* Automated Change

* Refactor : remove useless file

* Refactor : refactor the switch for workflow

* Refactor : refactor the switch for workflow

* Refactor : refactor the switch variables

* Refactor : refactor the switch variables

* Refactor : refactor the switch variables

* Refactor : refactor the switch variables

* Fix : fix the shell syntax

* Refactor : remove useless command

---------

Co-authored-by: taojintianxia <taojintianxia@users.noreply.github.com>
  • Loading branch information
taojintianxia and taojintianxia committed Oct 12, 2023
1 parent 3533e8d commit 0a53ca3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/required-reusable.yml
Expand Up @@ -43,6 +43,7 @@ jobs:
echo ${line} >> $GITHUB_OUTPUT
done
echo "GLOBAL_REPOSITORY=${{ env.GLOBAL_REPOSITORY }}"
echo "DISABLE_CI=${{ env.DISABLE_CI }}"
GLOBAL_CACHE_PREFIX=$(echo '${{ env.GLOBAL_REPOSITORY }}' | sed 's/\//_/g')
echo "GLOBAL_CACHE_PREFIX=${GLOBAL_CACHE_PREFIX}" >> $GITHUB_OUTPUT
- name: Check If Job is Executable
Expand All @@ -55,7 +56,10 @@ jobs:
echo "GLOBAL_CACHE_PREFIX=${GLOBAL_CACHE_PREFIX}" >> $GITHUB_OUTPUT
if [ ${{ toJSON(github.repository) }} = ${{ steps.import-variables.outputs.GLOBAL_REPOSITORY }} ]; then
echo "GLOBAL_IS_NIGHTLY_JOB_EXECUTABLE=true" >> $GITHUB_OUTPUT
echo "GLOBAL_JOB_ENABLED=true" >> $GITHUB_OUTPUT
echo "GLOBAL_JOB_ENABLED=false" >> $GITHUB_OUTPUT
if [ -z "${{ steps.import-variables.outputs.DISABLE_CI }}"] || [ "${{ steps.import-variables.outputs.DISABLE_CI }}"=="false" ] ; then
echo "GLOBAL_JOB_ENABLED=true" >> $GITHUB_OUTPUT
fi
fi
outputs:
GLOBAL_RUNS_ON: ${{ steps.import-variables.outputs.GLOBAL_RUNS_ON }}
Expand Down
@@ -1,3 +1,3 @@
GLOBAL_REPOSITORY=apache/shardingsphere
GLOBAL_RUNS_ON=ubuntu-latest
RUNNABLE_CI_LABEL=
DISABLE_CI=false

0 comments on commit 0a53ca3

Please sign in to comment.