- name: Setup Context
run: |
HASH=${{ github.event.workflow_run.head_commit.id }}
- if [ "${{ github.event.workflow_run.event }}" == "push" ] ; then
+ ISTAG=${{ startsWith(github.ref, 'refs/tags/') }}
+ if [ "$ISTAG" ] ; then
+ NAME=${{ github.event.workflow_run.head_branch }}
+ echo "Identified tag $NAME"
+ elif [ "${{ github.event.workflow_run.event }}" == "push" ] ; then
NAME=${{ github.event.workflow_run.head_branch }}
echo "Identified branch $NAME"
elif [ "${{ github.event.workflow_run.event }}" == "pull_request" ] ; then
fi
echo "NAME=$NAME" >> $GITHUB_ENV
echo "HASH=$HASH" >> $GITHUB_ENV
+ echo "ISTAG=$ISTAG" >> $GITHUB_ENV
- name: Update docs
continue-on-error: true
mv docs-new target/docs-$NAME-$HASH
cd target/
- if diff -r -x "*.zip" docs-master/ docs-$NAME-$HASH
+ (diff -r -x "*.zip" docs-master/ docs-$NAME-$HASH)
+ issame=$?
+
+ if [[ -n $ISTAG && $issame ]]
then
echo "Ignored run, documentation is the same as for current master"
else