@@ -84,25 +84,40 @@ jobs:
8484 latest_tag="$(git tag --sort=-v:refname \
8585 | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \
8686 | head -n 1)"
87- latest_rel_branch="$(git branch --all --list 'origin/*' \
88- --contains "${latest_tag}" --format "%(refname:lstrip=3)")"
8987 echo "latest_tag=${latest_tag}" >> "${GITHUB_OUTPUT}"
9088 echo "latest_tag is: ${latest_tag}"
89+ if [ -z "$latest_tag" ]; then
90+ echo "Error getting latest tag information"
91+ echo "error_latest=yes" >> "${GITHUB_OUTPUT}"
92+ exit 0
93+ fi
94+ latest_rel_branch="$(git branch --all --list 'origin/*' \
95+ --contains "${latest_tag}" --format "%(refname:lstrip=3)" || echo "")"
9196 echo "latest_rel_branch=${latest_rel_branch}" >> "${GITHUB_OUTPUT}"
9297 echo "latest_rel_branch is: ${latest_rel_branch}"
98+ if [ -z "$latest_rel_branch" ]; then
99+ echo "Error getting latest release branch information"
100+ echo "error_latest_rel_branch=yes" >> "${GITHUB_OUTPUT}"
101+ exit 0
102+ fi
103+ echo "error_latest=no" >> "${GITHUB_OUTPUT}"
104+ echo "error_latest_rel_branch=no" >> "${GITHUB_OUTPUT}"
93105 - name : Get enable values for meta step
94106 id : enable
95107 run : |
96108 latest="${{
97109 (github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
98110 == format('refs/tags/{0}', steps.tag-branch.outputs.latest_tag)
99- && matrix.os == 'ubuntu' }}"
111+ && matrix.os == 'ubuntu' && steps.tag-branch.outputs.error_latest == 'no' }}"
100112 current="${{
101113 ( contains(fromJSON('["tag", "release"]'), github.event_name)
102114 && (github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name))
103115 == format('refs/tags/{0}', steps.tag-branch.outputs.latest_tag)
104116 )
105- || github.ref == format('refs/heads/{0}', steps.tag-branch.outputs.latest_rel_branch)
117+ || ( github.ref == format('refs/heads/{0}', steps.tag-branch.outputs.latest_rel_branch)
118+ && steps.tag-branch.outputs.error_latest == 'no'
119+ && steps.tag-branch.outputs.error_latest_rel_branch == 'no'
120+ )
106121 }}"
107122 echo "latest=${latest}" >> "${GITHUB_OUTPUT}"
108123 echo "latest is ${latest}"
@@ -130,14 +145,14 @@ jobs:
130145 - name : Set up Docker Buildx
131146 uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
132147 - name : Login to GitHub Container Registry
133- uses : docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5 .0
148+ uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6 .0
134149 with :
135150 registry : ghcr.io
136151 username : ${{ github.actor }}
137152 password : ${{ secrets.GITHUB_TOKEN }}
138153 - name : Login to Docker Hub
139154 if : ${{ github.repository_owner == 'OSGeo' && github.event_name != 'pull_request' }}
140- uses : docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5 .0
155+ uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6 .0
141156 with :
142157 username : ${{ secrets.DOCKERHUB_USERNAME }}
143158 password : ${{ secrets.DOCKERHUB_TOKEN }}
0 commit comments