-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11326 from rouault/doc_stable
Preparatory steps to have https://gdal.org default to a 'stable' branch
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Update Stable Tag | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' # Matches all branches, but we later filter on the one matching the STABLE_BRANCH repository variable | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update-stable-tag: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'OSGeo/GDAL' | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check branch match | ||
id: check_branch | ||
env: | ||
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }} # Repository variable | ||
run: | | ||
echo "Push detected on branch $GITHUB_REF" | ||
if [[ "${GITHUB_REF#refs/heads/}" != "${STABLE_BRANCH}" ]]; then | ||
echo "This workflow only runs for branch $STABLE_BRANCH. Skipping further steps." | ||
echo "run=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "run=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Checkout code | ||
if: steps.check_branch.outputs.run == 'true' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Tag | ||
if: steps.check_branch.outputs.run == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GDAL-bot" | ||
touch .dummy-file | ||
git add .dummy-file | ||
# Do that so that stable doesn't have the same git sha as the stable branch, so ReadTheDocs triggers a build | ||
git commit -a -m "Add .dummy-file" | ||
git checkout -b stable | ||
git push -f origin stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
User-agent: * | ||
Allow: /en/stable/ | ||
Disallow: /en/ | ||
Sitemap: https://gdal.org/sitemap.xml |