actions-test/.github/workflows/merge.yml

47 lines
1.5 KiB
YAML
Raw Normal View History

2024-08-01 11:41:42 +10:00
on:
pull_request:
types:
- closed
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
outputs:
tagname: ${{ steps.describe.outputs.tagname }}
steps:
- uses: actions/checkout@v4
with:
2024-08-01 14:51:15 +10:00
ref: refs/heads/main
2024-08-01 11:44:09 +10:00
token: ${{ secrets.GITHUB_TOKEN }}
2024-08-01 14:51:15 +10:00
fetch-tags: true
2024-08-01 11:50:09 +10:00
# fetch-depth: 0
2024-08-01 11:41:42 +10:00
# - name: stinky but
2024-08-01 11:45:34 +10:00
# run: git sparse-checkout disable; git checkout origin/main
2024-08-01 11:55:13 +10:00
- name: status
run: git status
2024-08-01 12:09:34 +10:00
- name: shallow
run: cat .git/shallow
2024-08-01 14:08:19 +10:00
- name: deepen tree
2024-08-01 14:51:15 +10:00
run: git fetch --update-shallow --shallow-since 2023-08-17 --tags --recurse-submodules=no
# - name: deepen tree
# run: |
# depth=0
# while ! git describe --tags main; do
# depth=$((depth + 1))
# git fetch --tags --recurse-submodules=no --depth $depth origin main
# done
2024-08-01 11:55:13 +10:00
- name: status
run: git status
2024-08-01 14:52:16 +10:00
- name: shallow
run: cat .git/shallow
2024-08-01 12:00:40 +10:00
- name: descibe
2024-08-01 12:17:58 +10:00
run: git describe --tags main
2024-08-01 11:57:09 +10:00
- name: show refs
run: find .git/refs
2024-08-01 11:41:42 +10:00
# - name: peepee poopoo
2024-08-01 11:45:34 +10:00
# run: git checkout --progress --force -B main refs/remotes/origin/main
2024-08-01 11:41:42 +10:00
- name: Get git describe for prerelease
id: describe
2024-08-01 11:51:41 +10:00
run: echo "tagname=pre-$(git describe --tags main)" >> $GITHUB_OUTPUT
2024-08-01 11:50:09 +10:00
- name: show describe
run: echo ${{ steps.describe.outputs.tagname }}