-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (98 loc) · 3.18 KB
/
Copy pathdebug.yaml
File metadata and controls
117 lines (98 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Debug
on:
workflow_dispatch:
inputs:
bump-level:
description: "The level of version bump to calculate the next version (patch, minor, major)."
required: false
default: "patch"
permissions:
contents: read
jobs:
debug:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-tags: true
fetch-depth: 0
show-progress: true
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Get build dates
id: get_build_date
run: |
echo "date=$(date -u)" >> $GITHUB_OUTPUT
echo "isodate=$(date -u '+%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
echo "tagdate=$(date -u '+%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
echo "timestamp=$(date -u '+%s')" >> $GITHUB_OUTPUT
- name: Get latest tag
id: get_latest_tag
uses: actions-ecosystem/action-get-latest-tag@v1
with:
semver_only: true
initial_version: "0.0.0"
with_initial_version: true
- name: Get next tag
id: bump_semver
uses: actions-ecosystem/action-bump-semver@v1
with:
current_version: ${{ steps.get_latest_tag.outputs.tag }}
level: ${{ inputs.bump-level }}
- name: Generate change log
id: gen_changelog
uses: kiyoon/changelog-action@v2.0.2
with:
new-version-tag-for-future: ${{ steps.bump_semver.outputs.new_version }}
previous-version-tag: ${{ steps.get_latest_tag.outputs.tag }}
write-to-file: false
reverse-order: true
exclude-types: "chore,docs,style,refactor,perf"
exclude-scopes: "ci,build"
- name: Print generated change log
env:
CHANGELOG: ${{ steps.gen_changelog.outputs.changes }}
run: |
echo "$CHANGELOG"
- name: Read git info
id: git_info
uses: YunaBraska/git-info-action@3.0.7
with:
work-dir: "."
branch-fallback: "master"
tag-fallback: "0.0.1"
fallback-commit-type: "chore"
commit-msg-with-footer: "true"
max-changelog-length: 200
- name: Print git info
env:
GIT_INFO: ${{ toJson(steps.git_info.outputs) }}
run: |
echo "$GIT_INFO"
- name: Other interesting things
run: |
git rev-list --count ${{ github.ref_name }}