mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
Compare commits
259 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
32798b2266 | ||
![]() |
9a04c058bb | ||
![]() |
e400ca0ec8 | ||
![]() |
5d79051f9e | ||
![]() |
d353900ec6 | ||
![]() |
f938022a89 | ||
![]() |
f36b84c7a6 | ||
![]() |
932563efe6 | ||
![]() |
1cefad6ec3 | ||
![]() |
520f881f25 | ||
![]() |
c1c3d1decb | ||
![]() |
d229305964 | ||
![]() |
82ee4e60ab | ||
![]() |
658be2f7c0 | ||
![]() |
a449ab03ac | ||
![]() |
efba98456f | ||
![]() |
613f2a9ef4 | ||
![]() |
2db252424f | ||
![]() |
f28e26fcb2 | ||
![]() |
8fbad50488 | ||
![]() |
7f4e864068 | ||
![]() |
14adf3718a | ||
![]() |
d2167e8777 | ||
![]() |
82fce9c6d6 | ||
![]() |
ba1a03fb43 | ||
![]() |
fe038db00c | ||
![]() |
3b45f1b059 | ||
![]() |
27f13490ff | ||
![]() |
3a5f524b3b | ||
![]() |
ce69956ef2 | ||
![]() |
2d7caecfd4 | ||
![]() |
bef26ce264 | ||
![]() |
aaf3545227 | ||
![]() |
b3bcd8de13 | ||
![]() |
85228cdda9 | ||
![]() |
7e1d8d9ff3 | ||
![]() |
fe89084400 | ||
![]() |
965b6cd141 | ||
![]() |
514b496b62 | ||
![]() |
1d33260d82 | ||
![]() |
44e6c9a7a9 | ||
![]() |
2d945e69fa | ||
![]() |
26abdd72b6 | ||
![]() |
d6c1f51afd | ||
![]() |
27149ac8f4 | ||
![]() |
7e6b6a1303 | ||
![]() |
e7167cd879 | ||
![]() |
09c434097e | ||
![]() |
103d846561 | ||
![]() |
f9789de67b | ||
![]() |
7b3efa1ae4 | ||
![]() |
a7e67ad588 | ||
![]() |
1bd7d17f49 | ||
![]() |
9a6b02d3b6 | ||
![]() |
8f0dd01d11 | ||
![]() |
e1db24bc38 | ||
![]() |
195e4ede61 | ||
![]() |
4150064c29 | ||
![]() |
c31779ccc1 | ||
![]() |
2e715d5bdb | ||
![]() |
6ca1d98b25 | ||
![]() |
e8f85abca2 | ||
![]() |
771282b241 | ||
![]() |
b597dfb036 | ||
![]() |
be06eb0c3b | ||
![]() |
7fd6a0d2ce | ||
![]() |
dae786c139 | ||
![]() |
124367347e | ||
![]() |
8d2c049d03 | ||
![]() |
230ad376e6 | ||
![]() |
d7f3af5b4a | ||
![]() |
e584617c2e | ||
![]() |
10dcc55b32 | ||
![]() |
635194089f | ||
![]() |
862f59e266 | ||
![]() |
2a77671e30 | ||
![]() |
ffc96370c9 | ||
![]() |
45a8fbefbd | ||
![]() |
12b7d188e6 | ||
![]() |
9a1de3d80d | ||
![]() |
1c10803f16 | ||
![]() |
7f5774d136 | ||
![]() |
040aab5d2f | ||
![]() |
e672ffd959 | ||
![]() |
1790a8c8a7 | ||
![]() |
23a802284e | ||
![]() |
110e93cc3a | ||
![]() |
669f4093d2 | ||
![]() |
b075b9582b | ||
![]() |
9ba8da9604 | ||
![]() |
a48216b129 | ||
![]() |
28c587120d | ||
![]() |
69e7d85e58 | ||
![]() |
b11ba7443f | ||
![]() |
7bc42cbb46 | ||
![]() |
95c4b88b14 | ||
![]() |
13e56f0369 | ||
![]() |
c7cb687da2 | ||
![]() |
320254f582 | ||
![]() |
cace666ad9 | ||
![]() |
e4f80fe9d5 | ||
![]() |
156bcdfbf5 | ||
![]() |
9f70ae0949 | ||
![]() |
1d19061dff | ||
![]() |
e03878996b | ||
![]() |
314d58080e | ||
![]() |
205ecb8411 | ||
![]() |
b3e4e14646 | ||
![]() |
f5df948c7c | ||
![]() |
cb195c88b4 | ||
![]() |
1b5e308294 | ||
![]() |
7ee7b07a59 | ||
![]() |
57159c4154 | ||
![]() |
318cc4550e | ||
![]() |
2a55796e1e | ||
![]() |
11faa5bcd9 | ||
![]() |
080de394ad | ||
![]() |
04270e55c3 | ||
![]() |
e9bd047681 | ||
![]() |
b52a6ba62c | ||
![]() |
4583f3068a | ||
![]() |
603f8a294e | ||
![]() |
7a0e9009ca | ||
![]() |
027846530d | ||
![]() |
20d9000b37 | ||
![]() |
c918e93e6c | ||
![]() |
526e0bcf3f | ||
![]() |
3efec7d738 | ||
![]() |
b772dde15d | ||
![]() |
3a4ea8fe06 | ||
![]() |
7608d8bd68 | ||
![]() |
534653b227 | ||
![]() |
99c806b261 | ||
![]() |
026fa353bf | ||
![]() |
6f87fdf07c | ||
![]() |
6fa5c816c1 | ||
![]() |
a859391e05 | ||
![]() |
86e22cb1d7 | ||
![]() |
a06d7f7259 | ||
![]() |
8e55874a72 | ||
![]() |
47c52395a8 | ||
![]() |
d3fc5f7500 | ||
![]() |
b7fec8206a | ||
![]() |
13adcfdc61 | ||
![]() |
98a19de3dd | ||
![]() |
7238ff4875 | ||
![]() |
e1c6def123 | ||
![]() |
a3fff9678b | ||
![]() |
c46fec8a8d | ||
![]() |
ed483454cf | ||
![]() |
a0431eb84c | ||
![]() |
0f8131e1da | ||
![]() |
44b1e46858 | ||
![]() |
6358aa89d3 | ||
![]() |
f05994f00a | ||
![]() |
ca2778e720 | ||
![]() |
358eaba0a7 | ||
![]() |
c492b302a4 | ||
![]() |
f95aa0a8b2 | ||
![]() |
42c5d885a3 | ||
![]() |
fc7290f5bc | ||
![]() |
bac04ccd27 | ||
![]() |
0f475e0cbe | ||
![]() |
265f806c46 | ||
![]() |
0d2fb73723 | ||
![]() |
aedee2d3a6 | ||
![]() |
94646ef275 | ||
![]() |
ac6ee7a460 | ||
![]() |
ab67756d82 | ||
![]() |
d45f581df0 | ||
![]() |
6ca8806109 | ||
![]() |
88cf81de7f | ||
![]() |
4fb519d95d | ||
![]() |
d9eb79f4e7 | ||
![]() |
c2d36bfd1e | ||
![]() |
da72ca7ff3 | ||
![]() |
b49be184ba | ||
![]() |
a92d3f665e | ||
![]() |
75d02ca14c | ||
![]() |
bc0c064c15 | ||
![]() |
c39a79df11 | ||
![]() |
ed1dd41edc | ||
![]() |
eba46372c0 | ||
![]() |
cc62037c42 | ||
![]() |
7c299eb22f | ||
![]() |
93c469b601 | ||
![]() |
cc6411a227 | ||
![]() |
e166d475e7 | ||
![]() |
8495a16773 | ||
![]() |
859c43472b | ||
![]() |
b9529d4905 | ||
![]() |
613ee9b800 | ||
![]() |
1c741b4b40 | ||
![]() |
1f31efcfd1 | ||
![]() |
f24d748f8b | ||
![]() |
1c68030a6d | ||
![]() |
b98e0b6fd9 | ||
![]() |
dc6a6da104 | ||
![]() |
972c53f82b | ||
![]() |
19d222fca0 | ||
![]() |
ce9385103d | ||
![]() |
6871f53176 | ||
![]() |
fd631fd13a | ||
![]() |
b08a65ca3d | ||
![]() |
7a67835b20 | ||
![]() |
daaa308649 | ||
![]() |
d7e1c12a13 | ||
![]() |
e6d7f60b99 | ||
![]() |
331c645bc0 | ||
![]() |
1dd881b935 | ||
![]() |
6a429934f4 | ||
![]() |
2fc8b99e01 | ||
![]() |
df61b49715 | ||
![]() |
3480893ae4 | ||
![]() |
133b286869 | ||
![]() |
ce11ce0f73 | ||
![]() |
cf62a9f761 | ||
![]() |
6b29454859 | ||
![]() |
d412a8b9be | ||
![]() |
aebb456ae8 | ||
![]() |
f78faabb03 | ||
![]() |
6c999acf20 | ||
![]() |
726fe9ba5e | ||
![]() |
4923d1ca41 | ||
![]() |
d1dce85278 | ||
![]() |
6a7e02263c | ||
![]() |
610e980330 | ||
![]() |
73b5e05c85 | ||
![]() |
c73f478233 | ||
![]() |
43f1d995a1 | ||
![]() |
d2fdfdc076 | ||
![]() |
564ba51f1b | ||
![]() |
00f78f37b0 | ||
![]() |
af65b43bdc | ||
![]() |
ba3c7653e7 | ||
![]() |
93d729b69b | ||
![]() |
baaf5cdbe2 | ||
![]() |
78a040adc7 | ||
![]() |
d275988a8e | ||
![]() |
616936ff33 | ||
![]() |
61a1557cd0 | ||
![]() |
8a998b1518 | ||
![]() |
22d5ce483b | ||
![]() |
f949501dd5 | ||
![]() |
ab304d8562 | ||
![]() |
3cd6ba9145 | ||
![]() |
8b433953b8 | ||
![]() |
30b83fe1bc | ||
![]() |
aa82489df0 | ||
![]() |
38100de122 | ||
![]() |
898d31f1c4 | ||
![]() |
5e4b161118 | ||
![]() |
089be91d06 | ||
![]() |
22372c24f1 | ||
![]() |
30360a8409 | ||
![]() |
19657bbaed | ||
![]() |
cffa63d82e | ||
![]() |
38fb177cdf | ||
![]() |
2afc72cf66 |
@ -22,6 +22,15 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "boidolr",
|
||||
"name": "Raphael Boidol",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/652404?v=4",
|
||||
"profile": "https://home.boidol.dev/",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: jackton1
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: tj-actions
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: []
|
97
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
97
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -1,97 +0,0 @@
|
||||
name: 🐞 Bug
|
||||
description: Create a report to help us improve
|
||||
title: "[BUG] <title>"
|
||||
labels: [bug, needs triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Does this issue exist in the latest version?
|
||||
description: Please view all releases to confirm that this issue hasn't already been fixed.
|
||||
options:
|
||||
- label: I'm using the latest release
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Describe the bug?
|
||||
description: A clear and concise description of what the bug is
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
description: Steps to reproduce the behavior?
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
2. With this config...
|
||||
3. Run '...'
|
||||
4. See error...
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: What OS are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- all
|
||||
- ubuntu-latest or ubuntu-20.04
|
||||
- ubuntu-18.04
|
||||
- macos-latest or macos-10.15
|
||||
- macos-11
|
||||
- windows-latest or windows-2019
|
||||
- windows-2016
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior?
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
placeholder: Tell us what you expected!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
placeholder: |
|
||||
This can be achieved by:
|
||||
1. Re-running the workflow with debug logging enabled.
|
||||
2. Copy or download the log archive.
|
||||
3. Paste the contents here or upload the file in a subsequent comment.
|
||||
render: shell
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? or References?
|
||||
|
||||
Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
59
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
59
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@ -1,59 +0,0 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
title: "[Feature] <title>"
|
||||
labels: [enhancement]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is this feature missing in the latest version?
|
||||
description: Please upgrade to the latest version to verify that this feature is still missing.
|
||||
options:
|
||||
- label: I'm using the latest release
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: |
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: requests
|
||||
attributes:
|
||||
label: Describe the solution you'd like?
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: Describe alternatives you've considered?
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? or References?
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
32
.github/workflows/auto-approve.yml
vendored
32
.github/workflows/auto-approve.yml
vendored
@ -1,32 +0,0 @@
|
||||
name: Auto approve
|
||||
|
||||
on:
|
||||
pull_request_target
|
||||
|
||||
jobs:
|
||||
auto-approve:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: hmarr/auto-approve-action@v3
|
||||
if: |
|
||||
(
|
||||
github.event.pull_request.user.login == 'dependabot[bot]' ||
|
||||
github.event.pull_request.user.login == 'dependabot' ||
|
||||
github.event.pull_request.user.login == 'dependabot-preview[bot]' ||
|
||||
github.event.pull_request.user.login == 'dependabot-preview' ||
|
||||
github.event.pull_request.user.login == 'renovate[bot]' ||
|
||||
github.event.pull_request.user.login == 'renovate' ||
|
||||
github.event.pull_request.user.login == 'github-actions[bot]'
|
||||
)
|
||||
&&
|
||||
(
|
||||
github.actor == 'dependabot[bot]' ||
|
||||
github.actor == 'dependabot' ||
|
||||
github.actor == 'dependabot-preview[bot]' ||
|
||||
github.actor == 'dependabot-preview' ||
|
||||
github.actor == 'renovate[bot]' ||
|
||||
github.actor == 'renovate' ||
|
||||
github.actor == 'github-actions[bot]'
|
||||
)
|
||||
with:
|
||||
github-token: ${{ secrets.PAT_TOKEN }}
|
6
.github/workflows/codacy-analysis.yml
vendored
6
.github/workflows/codacy-analysis.yml
vendored
@ -29,12 +29,12 @@ jobs:
|
||||
steps:
|
||||
# Checkout the repository to the GitHub Actions runner
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||
- name: Run Codacy Analysis CLI
|
||||
continue-on-error: true
|
||||
uses: codacy/codacy-analysis-cli-action@v4.3.0
|
||||
uses: codacy/codacy-analysis-cli-action@v4.4.5
|
||||
with:
|
||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
||||
# You can also omit the token and run the tools that support default configurations
|
||||
@ -51,6 +51,6 @@ jobs:
|
||||
# Upload the SARIF file generated in the previous step
|
||||
- name: Upload SARIF results file
|
||||
continue-on-error: true
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
13
.github/workflows/greetings.yml
vendored
13
.github/workflows/greetings.yml
vendored
@ -1,13 +0,0 @@
|
||||
name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
|
||||
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
|
2
.github/workflows/rebase.yml
vendored
2
.github/workflows/rebase.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.6.0
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
||||
|
4
.github/workflows/sync-release-version.yml
vendored
4
.github/workflows/sync-release-version.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
update-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Run release-tagger
|
||||
@ -24,7 +24,7 @@ jobs:
|
||||
- name: Run git-cliff
|
||||
uses: tj-actions/git-cliff@v1
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5.0.2
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
base: "main"
|
||||
labels: "merge when passing"
|
||||
|
62
.github/workflows/test.yml
vendored
62
.github/workflows/test.yml
vendored
@ -8,83 +8,81 @@ on:
|
||||
- main
|
||||
release:
|
||||
types: [published, created]
|
||||
pull_request_review:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test branch-name
|
||||
name: Test branch-names
|
||||
runs-on: ${{ matrix.platform }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, windows-2022]
|
||||
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.6.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Run test
|
||||
id: branch-name
|
||||
id: branch-names
|
||||
uses: ./
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "Default Branch: ${{ steps.branch-name.outputs.default_branch }}"
|
||||
echo "Current Branch: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Base Ref: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "Head Ref: ${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
echo "Ref: ${{ steps.branch-name.outputs.ref_branch }}"
|
||||
echo "Is Default: ${{ steps.branch-name.outputs.is_default }}"
|
||||
echo "Is Tag: ${{ steps.branch-name.outputs.is_tag }}"
|
||||
echo "Current tag: ${{ steps.branch-name.outputs.tag }}"
|
||||
echo "Default Branch: ${{ steps.branch-names.outputs.default_branch }}"
|
||||
echo "Current Branch: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
echo "Base Ref: ${{ steps.branch-names.outputs.base_ref_branch }}"
|
||||
echo "Head Ref: ${{ steps.branch-names.outputs.head_ref_branch }}"
|
||||
echo "Ref: ${{ steps.branch-names.outputs.ref_branch }}"
|
||||
echo "Is Default: ${{ steps.branch-names.outputs.is_default }}"
|
||||
echo "Is Tag: ${{ steps.branch-names.outputs.is_tag }}"
|
||||
echo "Current tag: ${{ steps.branch-names.outputs.tag }}"
|
||||
- name: Test is_default output for pull request
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'false'
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-names.outputs.is_tag == 'false' && steps.branch-names.outputs.is_default != 'false'
|
||||
run: |
|
||||
echo "Is default is invalid: ${{ steps.branch-name.outputs.is_default }}"
|
||||
echo "Is default is invalid: ${{ steps.branch-names.outputs.is_default }}"
|
||||
exit 1
|
||||
- name: Test is_default output for non pull request
|
||||
if: "!contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'true'"
|
||||
if: "!contains(github.event_name, 'pull_request') && steps.branch-names.outputs.is_tag == 'false' && steps.branch-names.outputs.is_default != 'true'"
|
||||
run: |
|
||||
echo "Is default is invalid: ${{ steps.branch-name.outputs.is_default }}"
|
||||
echo "Is default is invalid: ${{ steps.branch-names.outputs.is_default }}"
|
||||
exit 1
|
||||
- name: Test base_ref_branch output
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.base_ref_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-names.outputs.is_tag == 'false' && !steps.branch-names.outputs.base_ref_branch
|
||||
run: |
|
||||
echo "Base ref unset: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "Base ref unset: ${{ steps.branch-names.outputs.base_ref_branch }}"
|
||||
exit 1
|
||||
- name: Test head_ref output
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.head_ref_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-names.outputs.is_tag == 'false' && !steps.branch-names.outputs.head_ref_branch
|
||||
run: |
|
||||
echo "Head ref unset: ${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
echo "Head ref unset: ${{ steps.branch-names.outputs.head_ref_branch }}"
|
||||
exit 1
|
||||
- name: Test ref_branch output
|
||||
if: "!steps.branch-name.outputs.ref_branch && steps.branch-name.outputs.is_tag == 'false'"
|
||||
if: "!steps.branch-names.outputs.ref_branch && steps.branch-names.outputs.is_tag == 'false'"
|
||||
run: |
|
||||
echo "Ref unset: ${{ steps.branch-name.outputs.ref_branch }}"
|
||||
echo "Ref unset: ${{ steps.branch-names.outputs.ref_branch }}"
|
||||
exit 1
|
||||
- name: Test current_branch output for pull_request or pull_request_target event.
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.current_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-names.outputs.is_tag == 'false' && !steps.branch-names.outputs.current_branch
|
||||
run: |
|
||||
echo "Current branch unset: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Current branch unset: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
exit 1
|
||||
- name: Test current_branch output for push event.
|
||||
if: github.event_name == 'push' && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.current_branch
|
||||
if: github.event_name == 'push' && steps.branch-names.outputs.is_tag == 'false' && !steps.branch-names.outputs.current_branch
|
||||
run: |
|
||||
echo "Current branch unset: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Current branch unset: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
exit 1
|
||||
- name: Test current_branch output for tag based push event.
|
||||
if: github.event_name == 'push' && steps.branch-name.outputs.is_tag == 'true' && !steps.branch-name.outputs.base_ref_branch
|
||||
if: github.event_name == 'push' && steps.branch-names.outputs.is_tag == 'true' && !steps.branch-names.outputs.base_ref_branch
|
||||
run: |
|
||||
echo "Base ref unset: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "Base ref unset: ${{ steps.branch-names.outputs.base_ref_branch }}"
|
||||
exit 1
|
||||
- name: Test tag output for tag based push event.
|
||||
if: github.event_name == 'push' && steps.branch-name.outputs.is_tag == 'true' && !steps.branch-name.outputs.tag
|
||||
if: github.event_name == 'push' && steps.branch-names.outputs.is_tag == 'true' && !steps.branch-names.outputs.tag
|
||||
run: |
|
||||
echo "Current tag unset: ${{ steps.branch-name.outputs.tag }}"
|
||||
echo "Current tag unset: ${{ steps.branch-names.outputs.tag }}"
|
||||
exit 1
|
||||
|
9
.github/workflows/update-readme.yml
vendored
9
.github/workflows/update-readme.yml
vendored
@ -9,18 +9,21 @@ jobs:
|
||||
sync-assets:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run auto-doc
|
||||
uses: tj-actions/auto-doc@v3
|
||||
with:
|
||||
use_code_blocks: true
|
||||
use_major_version: true
|
||||
|
||||
- name: Run remark
|
||||
uses: tj-actions/remark@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v16
|
||||
uses: tj-actions/verify-changed-files@v20
|
||||
id: verify_changed_files
|
||||
with:
|
||||
files: |
|
||||
@ -34,7 +37,7 @@ jobs:
|
||||
|
||||
- name: Create Pull Request
|
||||
if: failure()
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
base: "main"
|
||||
labels: "merge when passing"
|
||||
|
183
HISTORY.md
183
HISTORY.md
@ -1,5 +1,188 @@
|
||||
# Changelog
|
||||
|
||||
# [8.0.1](https://github.com/tj-actions/branch-names/compare/v8.0.0...v8.0.1) - (2024-02-07)
|
||||
|
||||
## <!-- 13 -->📦 Bumps
|
||||
|
||||
- Bump peter-evans/create-pull-request from 5 to 6
|
||||
|
||||
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
|
||||
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
|
||||
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: peter-evans/create-pull-request
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-major
|
||||
...
|
||||
|
||||
Signed-off-by: dependabot[bot] <support@github.com> ([d7e1c12](https://github.com/tj-actions/branch-names/commit/d7e1c12a1319bef4a91b309ff0b19f9c9c23ce29)) - (dependabot[bot])
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md
|
||||
([331c645](https://github.com/tj-actions/branch-names/commit/331c645bc0d6a25b59d335c5998e0d6a84de5473)) - (jackton1)
|
||||
- Update README.md ([1dd881b](https://github.com/tj-actions/branch-names/commit/1dd881b93548225d6846bfb1e11db437ec69b3e8)) - (Tonye Jack)
|
||||
- Update README.md ([df61b49](https://github.com/tj-actions/branch-names/commit/df61b4971562e262705f8aedd34a353cc760121b)) - (Tonye Jack)
|
||||
|
||||
## <!-- 30 -->📝 Other
|
||||
|
||||
- PR [#282](https://github.com/tj-actions/branch-names/pull/282): update test.yml ([6871f53](https://github.com/tj-actions/branch-names/commit/6871f53176ad61624f978536bbf089c574dc19a2)) - (repo-ranger[bot])
|
||||
- PR [#281](https://github.com/tj-actions/branch-names/pull/281): update tj-actions/verify-changed-files action to v18 ([b08a65c](https://github.com/tj-actions/branch-names/commit/b08a65ca3d4a4d94606ea92ad30085d74c8d1d46)) - (repo-ranger[bot])
|
||||
- PR [#279](https://github.com/tj-actions/branch-names/pull/279): peter-evans/create-pull-request from 5 to 6 ([daaa308](https://github.com/tj-actions/branch-names/commit/daaa3086490a7b51a7cf11025b452fc3e215bc9b)) - (repo-ranger[bot])
|
||||
- PR [#278](https://github.com/tj-actions/branch-names/pull/278): README.md ([e6d7f60](https://github.com/tj-actions/branch-names/commit/e6d7f60b99ffa6afdb58eec2c3d2ac2deae3b3e1)) - (repo-ranger[bot])
|
||||
- PR [#277](https://github.com/tj-actions/branch-names/pull/277): update tj-actions/verify-changed-files action to v17 ([6a42993](https://github.com/tj-actions/branch-names/commit/6a429934f4c10691ff33b9c0c5c7b0c6edf1da8b)) - (repo-ranger[bot])
|
||||
- PR [#276](https://github.com/tj-actions/branch-names/pull/276): update github/codeql-action action to v3 ([3480893](https://github.com/tj-actions/branch-names/commit/3480893ae4ce4a095e4c823474091bb3e1cddc75)) - (repo-ranger[bot])
|
||||
- PR [#275](https://github.com/tj-actions/branch-names/pull/275): to v8 ([ce11ce0](https://github.com/tj-actions/branch-names/commit/ce11ce0f7384e0fa0d9c9f692dc646b32ac3ca9c)) - (repo-ranger[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Update test.yml ([fd631fd](https://github.com/tj-actions/branch-names/commit/fd631fd13a734d793c5cb0152217764ca3e5bfdf)) - (Tonye Jack)
|
||||
- **deps:** Update tj-actions/verify-changed-files action to v18 ([7a67835](https://github.com/tj-actions/branch-names/commit/7a67835b20204f0f3ee6524f4b6a336410a601e3)) - (renovate[bot])
|
||||
- **deps:** Update tj-actions/verify-changed-files action to v17 ([2fc8b99](https://github.com/tj-actions/branch-names/commit/2fc8b99e0131dd6de58bc7a880080809d1141834)) - (renovate[bot])
|
||||
- **deps:** Update github/codeql-action action to v3 ([133b286](https://github.com/tj-actions/branch-names/commit/133b2868695e37161eb02f366be04ab37b9def81)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded from v7.0.7 -> v8
|
||||
([cf62a9f](https://github.com/tj-actions/branch-names/commit/cf62a9f7613bf12dcd4940cbe365e47fd49a161e)) - (jackton1)
|
||||
|
||||
# [8.0.0](https://github.com/tj-actions/branch-names/compare/v7.0.7...v8.0.0) - (2023-12-05)
|
||||
|
||||
## <!-- 17 -->➖ Remove
|
||||
|
||||
- Deleted .github/workflows/auto-approve.yml ([d412a8b](https://github.com/tj-actions/branch-names/commit/d412a8b9be018a303e4c446b1e1e77e26dc79603)) - (Tonye Jack)
|
||||
|
||||
## <!-- 30 -->📝 Other
|
||||
|
||||
- PR [#273](https://github.com/tj-actions/branch-names/pull/273): to v7.0.7 ([aebb456](https://github.com/tj-actions/branch-names/commit/aebb456ae8608f6dc5a66f8ee1af451d4cc6a121)) - (repo-ranger[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Create SECURITY.md ([#274](https://github.com/tj-actions/branch-names/issues/274)) ([6b29454](https://github.com/tj-actions/branch-names/commit/6b29454859d080290fc5e9c05ee4e82b9156404b)) - (Tonye Jack)
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded from v7.0.6 -> v7.0.7
|
||||
([f78faab](https://github.com/tj-actions/branch-names/commit/f78faabb0379ad0477ee82bf26324d6c8e6e6a05)) - (jackton1)
|
||||
|
||||
# [7.0.7](https://github.com/tj-actions/branch-names/compare/v7.0.6...v7.0.7) - (2023-12-03)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Fix indentation ([610e980](https://github.com/tj-actions/branch-names/commit/610e9803309427800eaee5dcde8de48e946f02e3)) - (Tonye Jack)
|
||||
|
||||
## <!-- 17 -->➖ Remove
|
||||
|
||||
- Deleted .github/workflows/greetings.yml ([baaf5cd](https://github.com/tj-actions/branch-names/commit/baaf5cdbe276584218fb70fa9958bdce58bea50a)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update action.yml ([d1dce85](https://github.com/tj-actions/branch-names/commit/d1dce85278f56712618c88f991af7bdaa2d1e1d7)) - (Tonye Jack)
|
||||
- Update action.yml ([6a7e022](https://github.com/tj-actions/branch-names/commit/6a7e02263c0eeb64d7ca5dc54a91e0064f54679b)) - (Tonye Jack)
|
||||
- Updated README.md
|
||||
([43f1d99](https://github.com/tj-actions/branch-names/commit/43f1d995a17f4507d6549ab09250d44c5e0e2a43)) - (jackton1)
|
||||
- Update README.md ([d2fdfdc](https://github.com/tj-actions/branch-names/commit/d2fdfdc07649eb8981e8bf1619b81b8d5047b310)) - (Tonye Jack)
|
||||
- Update README.md ([564ba51](https://github.com/tj-actions/branch-names/commit/564ba51f1b32b3303f151799871492f0b171ef42)) - (Tonye Jack)
|
||||
- Updated README.md
|
||||
([af65b43](https://github.com/tj-actions/branch-names/commit/af65b43bdc8c0a8db39c03cd8923673eb7e52d90)) - (jackton1)
|
||||
- Update update-readme.yml ([ba3c765](https://github.com/tj-actions/branch-names/commit/ba3c7653e7a0d1836dfa90780f2208f44c14277c)) - (Tonye Jack)
|
||||
- Updated README.md ([#266](https://github.com/tj-actions/branch-names/issues/266))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([78a040a](https://github.com/tj-actions/branch-names/commit/78a040adc7c4f0be6b6952c3b9a0a37e4b70cb66)) - (tj-actions[bot])
|
||||
- Update README.md ([d275988](https://github.com/tj-actions/branch-names/commit/d275988a8ea21addd5362e44b8338faf24cfed0b)) - (Tonye Jack)
|
||||
- Update README.md ([616936f](https://github.com/tj-actions/branch-names/commit/616936ff339f712e9a31163275b4fc3abece2aae)) - (Tonye Jack)
|
||||
- Updated README.md ([#265](https://github.com/tj-actions/branch-names/issues/265))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([61a1557](https://github.com/tj-actions/branch-names/commit/61a1557cd001eb325dddd1b74d358e8339114958)) - (tj-actions[bot])
|
||||
- Update README.md ([8a998b1](https://github.com/tj-actions/branch-names/commit/8a998b151870dadbc1ba597191b0adde3532ac3f)) - (Tonye Jack)
|
||||
|
||||
## <!-- 30 -->📝 Other
|
||||
|
||||
- PR [#272](https://github.com/tj-actions/branch-names/pull/272): remove vulnerable events from test ([6c999ac](https://github.com/tj-actions/branch-names/commit/6c999acf206f5561e19f46301bb310e9e70d8815)) - (repo-ranger[bot])
|
||||
- Remove vulnerable events from test ([726fe9b](https://github.com/tj-actions/branch-names/commit/726fe9ba5e9da4fcc716223b7994ffd0358af060)) - (Tonye Jack)
|
||||
- PR [#271](https://github.com/tj-actions/branch-names/pull/271): prevent arbitrary code injection via untrusted inputs ([4923d1c](https://github.com/tj-actions/branch-names/commit/4923d1ca41f928c24f1c1b3af9daaadfb71e6337)) - (repo-ranger[bot])
|
||||
- Prevent arbitrary code injection via untrusted inputs ([73b5e05](https://github.com/tj-actions/branch-names/commit/73b5e05c8551b0ea18e91f7ae8acd38ce5ea4ede)) - (Tonye Jack)
|
||||
- PR [#270](https://github.com/tj-actions/branch-names/pull/270): README.md ([c73f478](https://github.com/tj-actions/branch-names/commit/c73f47823369a524870914f826f8270195c89d14)) - (repo-ranger[bot])
|
||||
- PR [#269](https://github.com/tj-actions/branch-names/pull/269): README.md ([00f78f3](https://github.com/tj-actions/branch-names/commit/00f78f37b0a8a5dcd5c5a78317743f17ee9dc9c5)) - (repo-ranger[bot])
|
||||
- PR [#264](https://github.com/tj-actions/branch-names/pull/264): to v7.0.6 ([22d5ce4](https://github.com/tj-actions/branch-names/commit/22d5ce483bf4d0d875c227529624c68632373d9e)) - (repo-ranger[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Remove deprecated set-ouput calls ([#268](https://github.com/tj-actions/branch-names/issues/268)) ([93d729b](https://github.com/tj-actions/branch-names/commit/93d729b69b958481c864e2bc121bb339f0e0d744)) - (Tonye Jack)
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded from v7.0.5 -> v7.0.6
|
||||
([f949501](https://github.com/tj-actions/branch-names/commit/f949501dd56f7e4055ad441276960789d534ec4a)) - (jackton1)
|
||||
|
||||
# [7.0.6](https://github.com/tj-actions/branch-names/compare/v7.0.5...v7.0.6) - (2023-11-01)
|
||||
|
||||
## <!-- 13 -->📦 Bumps
|
||||
|
||||
- Bump actions/checkout from 4.1.0 to 4.1.1
|
||||
|
||||
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
|
||||
- [Release notes](https://github.com/actions/checkout/releases)
|
||||
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
|
||||
- [Commits](https://github.com/actions/checkout/compare/v4.1.0...b4ffde65f46336ab88eb53be808477a3936bae11)
|
||||
|
||||
---
|
||||
updated-dependencies:
|
||||
- dependency-name: actions/checkout
|
||||
dependency-type: direct:production
|
||||
update-type: version-update:semver-patch
|
||||
...
|
||||
|
||||
Signed-off-by: dependabot[bot] <support@github.com> ([8b43395](https://github.com/tj-actions/branch-names/commit/8b433953b8dc5fb0686eec8565c10737bb95483b)) - (dependabot[bot])
|
||||
|
||||
## <!-- 17 -->➖ Remove
|
||||
|
||||
- Deleted .github/ISSUE_TEMPLATE/feature_request.yaml ([089be91](https://github.com/tj-actions/branch-names/commit/089be91d06dfe2991fba1157c5c1f9ad53244ce9)) - (Tonye Jack)
|
||||
- Deleted .github/ISSUE_TEMPLATE/bug_report.yaml ([22372c2](https://github.com/tj-actions/branch-names/commit/22372c24f1da5ba6cc6a4b09518595191f0db420)) - (Tonye Jack)
|
||||
- Deleted .github/FUNDING.yml ([30360a8](https://github.com/tj-actions/branch-names/commit/30360a840993a8922a306594a8439431d6a987d4)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update README.md ([ab304d8](https://github.com/tj-actions/branch-names/commit/ab304d8562e2f137165e1d930e6d22d431189074)) - (Tonye Jack)
|
||||
- Update README.md ([19657bb](https://github.com/tj-actions/branch-names/commit/19657bbaedafb67e12af31127198546302a920a1)) - (Tonye Jack)
|
||||
- Update README.md ([cffa63d](https://github.com/tj-actions/branch-names/commit/cffa63d82e1d45cad6f0464f2f78434a92ff92bf)) - (Tonye Jack)
|
||||
|
||||
## <!-- 30 -->📝 Other
|
||||
|
||||
- PR [#263](https://github.com/tj-actions/branch-names/pull/263): actions/checkout from 4.1.0 to 4.1.1 ([3cd6ba9](https://github.com/tj-actions/branch-names/commit/3cd6ba9145bdf0dd77d5ea9fc5c2bcf3371386a2)) - (repo-ranger[bot])
|
||||
- PR [#259](https://github.com/tj-actions/branch-names/pull/259): update actions/checkout action to v4 ([898d31f](https://github.com/tj-actions/branch-names/commit/898d31f1c43ce8fc290c291dd0f6412a82cd3170)) - (repo-ranger[bot])
|
||||
- PR [#257](https://github.com/tj-actions/branch-names/pull/257): to v7.0.5 ([38fb177](https://github.com/tj-actions/branch-names/commit/38fb177cdf42b4d4a4a19ad0ec4354dd5be09765)) - (repo-ranger[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update actions/checkout action to v4.1.1 ([30b83fe](https://github.com/tj-actions/branch-names/commit/30b83fe1bceced0e41dc4c3fd8a3210cb07b5947)) - (renovate[bot])
|
||||
- **deps:** Update actions/checkout action to v4.1.0 ([aa82489](https://github.com/tj-actions/branch-names/commit/aa82489df0e5f20d4734b03cd12d6aaeb1fb9b3b)) - (renovate[bot])
|
||||
- **deps:** Update actions/checkout digest to 8ade135 ([38100de](https://github.com/tj-actions/branch-names/commit/38100de122f8790a84a3ce1dbf7418b8effa1d65)) - (renovate[bot])
|
||||
- **deps:** Update actions/checkout action to v4 ([5e4b161](https://github.com/tj-actions/branch-names/commit/5e4b161118e026e63c7b319174e1ded0258cdd95)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded from v7.0.4 -> v7.0.5
|
||||
([2afc72c](https://github.com/tj-actions/branch-names/commit/2afc72cf668bfb2e412bfaf70395ca3dbda72702)) - (jackton1)
|
||||
|
||||
# [7.0.5](https://github.com/tj-actions/branch-names/compare/v7.0.4...v7.0.5) - (2023-08-29)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Update test to include release events ([b7525e0](https://github.com/tj-actions/branch-names/commit/b7525e0e0397bad69b3cf03a940ad71f624c3dd0)) - (Tonye Jack)
|
||||
|
||||
## <!-- 30 -->📝 Other
|
||||
|
||||
- PR [#256](https://github.com/tj-actions/branch-names/pull/256): update test to include release events ([033f235](https://github.com/tj-actions/branch-names/commit/033f2358d95522973eee35810e35a86fae4a71d8)) - (repo-ranger[bot])
|
||||
- PR [#255](https://github.com/tj-actions/branch-names/pull/255): to v7.0.4 ([2f53fbb](https://github.com/tj-actions/branch-names/commit/2f53fbbb518fd325daed3febf7365068504c6ab7)) - (repo-ranger[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded from v7.0.3 -> v7.0.4
|
||||
([790ddd8](https://github.com/tj-actions/branch-names/commit/790ddd8af0d6195dd3f1a0e7202a6c1654c4ebca)) - (jackton1)
|
||||
|
||||
# [7.0.4](https://github.com/tj-actions/branch-names/compare/v7.0.3...v7.0.4) - (2023-08-26)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
156
README.md
156
README.md
@ -5,18 +5,34 @@
|
||||
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
||||
[](https://github.com/search?o=desc\&q=tj-actions+branch-names+language%3AYAML\&s=\&type=Code)
|
||||
|
||||
[](https://app.codacy.com/gh/tj-actions/branch-names?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/branch-names\&utm_campaign=Badge_Grade_Settings)
|
||||
[](https://app.codacy.com/gh/tj-actions/branch-names/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
|
||||
[](https://github.com/tj-actions/branch-names/actions?query=workflow%3ACI)
|
||||
[](https://github.com/tj-actions/branch-names/actions/workflows/sync-release-version.yml)
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
|
||||
[](#contributors-)
|
||||
[](#contributors-)
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
Get a branch or tag name without the `/ref/*` prefix.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Features](#features)
|
||||
* [Usage](#usage)
|
||||
* [Inputs](#inputs)
|
||||
* [Outputs](#outputs)
|
||||
* [Events](#events)
|
||||
* [`push*`](#push)
|
||||
* [`pull_request*`](#pull_request)
|
||||
* [`tag*`](#tag)
|
||||
* [Other supported events](#other-supported-events)
|
||||
* [Possible usage with actions/checkout](#possible-usage-with-actionscheckout)
|
||||
* [Credits](#credits)
|
||||
* [Report Bugs](#report-bugs)
|
||||
* [Contributors ✨](#contributors-)
|
||||
|
||||
## Features
|
||||
|
||||
* Retrieve the current branch name without any prefix. (e.g. `'refs/heads/main'` -> `'main'`)
|
||||
@ -31,31 +47,31 @@ Get a branch or tag name without the `/ref/*` prefix.
|
||||
...
|
||||
|
||||
steps:
|
||||
- name: Get branch name
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
- name: Get branch names.
|
||||
id: branch-names
|
||||
uses: tj-actions/branch-names@v8
|
||||
|
||||
- name: Running on the default branch.
|
||||
if: steps.branch-name.outputs.is_default == 'true'
|
||||
if: steps.branch-names.outputs.is_default == 'true'
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on default: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on default: main"
|
||||
|
||||
- name: Running on a pull request branch.
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
if: steps.branch-names.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on pr: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on pr: feature/test"
|
||||
|
||||
- name: Running on a pull request branch.
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
if: steps.branch-names.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Base branch: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "Base branch: ${{ steps.branch-names.outputs.base_ref_branch }}"
|
||||
# Outputs: "Base branch: main"
|
||||
|
||||
- name: Running on any event
|
||||
- name: Running on any event.
|
||||
run: |
|
||||
echo "Default branch: ${{ steps.branch-name.outputs.default_branch }}"
|
||||
echo "Default branch: ${{ steps.branch-names.outputs.default_branch }}"
|
||||
# Outputs: "Default branch: main"
|
||||
```
|
||||
|
||||
@ -69,6 +85,25 @@ Support this project with a :star:
|
||||
|
||||
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
|
||||
|
||||
## Inputs
|
||||
|
||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||
|
||||
```yaml
|
||||
- uses: tj-actions/branch-names@v8
|
||||
id: branch-names
|
||||
with:
|
||||
# The prefix that should be
|
||||
# stripped from the tag e.g
|
||||
# `v` -> with a tag
|
||||
# `v0.0.1` -> returns `0.0.1`
|
||||
# Type: string
|
||||
strip_tag_prefix: ''
|
||||
|
||||
```
|
||||
|
||||
<!-- AUTO-DOC-INPUT:END -->
|
||||
|
||||
## Outputs
|
||||
|
||||
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
|
||||
@ -86,19 +121,9 @@ Support this project with a :star:
|
||||
|
||||
<!-- AUTO-DOC-OUTPUT:END -->
|
||||
|
||||
## Inputs
|
||||
|
||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||
|
||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||
|----------------------------------------------------------------------------------|--------|----------|---------|----------------------------------------------------------------------------------------------------------------|
|
||||
| <a name="input_strip_tag_prefix"></a>[strip\_tag\_prefix](#input_strip_tag_prefix) | string | false | | The prefix that should be <br>stripped from the tag e.g <br>`v` -> with a tag <br>`v0.0.1` -> returns `0.0.1` |
|
||||
|
||||
<!-- AUTO-DOC-INPUT:END -->
|
||||
|
||||
## Events
|
||||
|
||||
* `push*`
|
||||
### `push*`
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@ -109,38 +134,38 @@ on:
|
||||
...
|
||||
steps:
|
||||
- name: Get branch names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
id: branch-names
|
||||
uses: tj-actions/branch-names@v8
|
||||
|
||||
- name: Current branch name
|
||||
- name: Current branch names
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "main" the branch that triggered the push event.
|
||||
|
||||
- name: Running on the default branch.
|
||||
if: steps.branch-name.outputs.is_default == 'true'
|
||||
if: steps.branch-names.outputs.is_default == 'true'
|
||||
run: |
|
||||
echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on default: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on default: main".
|
||||
|
||||
- name: Running on the default branch (i.e non tag based branch).
|
||||
if: steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default == 'true'
|
||||
if: steps.branch-names.outputs.is_tag == 'false' && steps.branch-names.outputs.is_default == 'true'
|
||||
run: |
|
||||
echo "Running on branch: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on branch: main".
|
||||
|
||||
- name: Get Ref brach name
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.ref_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.ref_branch }}"
|
||||
# Outputs: "main"
|
||||
|
||||
- name: Default branch name
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.default_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.default_branch }}"
|
||||
# Outputs: "main" the default branch.
|
||||
```
|
||||
|
||||
* `pull_request*`
|
||||
### `pull_request*`
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@ -151,48 +176,48 @@ on:
|
||||
...
|
||||
steps:
|
||||
- name: Get branch names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
id: branch-names
|
||||
uses: tj-actions/branch-names@v8
|
||||
|
||||
- name: Current branch name
|
||||
- name: Current branch names
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "feature/test" current PR branch.
|
||||
|
||||
- name: Running on a non tag based branch and a PR branch.
|
||||
if: steps.branch-name.outputs.is_default == 'false'
|
||||
if: steps.branch-names.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Running on branch: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on branch: feature/test".
|
||||
|
||||
- name: Running on a pull request (i.e non tag based branch).
|
||||
if: steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default == 'false'
|
||||
if: steps.branch-names.outputs.is_tag == 'false' && steps.branch-names.outputs.is_default == 'false'
|
||||
run: |
|
||||
echo "Running on branch: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
echo "Running on branch: ${{ steps.branch-names.outputs.current_branch }}"
|
||||
# Outputs: "Running on branch: feature/test".
|
||||
|
||||
- name: Get Ref branch name
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.ref_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.ref_branch }}"
|
||||
# Outputs: "1/merge"
|
||||
|
||||
- name: Get Head Ref branch name (i.e The current pull request branch)
|
||||
- name: Get Head Ref branch names (i.e The current pull request branch)
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.head_ref_branch }}"
|
||||
# Outputs: "feature/test" current PR branch.
|
||||
|
||||
- name: Get Base Ref branch name (i.e The target of a pull request.)
|
||||
- name: Get Base Ref branch names (i.e The target of a pull request.)
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.base_ref_branch }}"
|
||||
# Outputs: "main".
|
||||
|
||||
- name: Default branch name
|
||||
- name: Default branch names
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.default_branch }}"
|
||||
echo "${{ steps.branch-names.outputs.default_branch }}"
|
||||
# Outputs: "main" the default branch.
|
||||
```
|
||||
|
||||
* `tag*`
|
||||
### `tag*`
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@ -203,23 +228,29 @@ on:
|
||||
...
|
||||
steps:
|
||||
- name: Get branch names
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
id: branch-names
|
||||
uses: tj-actions/branch-names@v8
|
||||
with:
|
||||
strip_tag_prefix: v # Optionally strip the leading `v` from the tag.
|
||||
|
||||
- name: Running on a tag branch.
|
||||
if: steps.branch-name.outputs.is_tag == 'true'
|
||||
if: steps.branch-names.outputs.is_tag == 'true'
|
||||
run: |
|
||||
echo "Running on: ${{ steps.branch-name.outputs.tag }}"
|
||||
# Outputs: "Running on: v0.0.1".
|
||||
echo "Running on: ${{ steps.branch-names.outputs.tag }}"
|
||||
# Outputs: "Running on: 0.0.1".
|
||||
|
||||
- name: Get the current tag
|
||||
if: steps.branch-name.outputs.is_tag == 'true' # Replaces: startsWith(github.ref, 'refs/tags/')
|
||||
if: steps.branch-names.outputs.is_tag == 'true' # Replaces: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
echo "${{ steps.branch-name.outputs.tag }}"
|
||||
# Outputs: "v0.0.1" OR "0.0.1"
|
||||
echo "${{ steps.branch-names.outputs.tag }}"
|
||||
# Outputs: "0.0.1"
|
||||
```
|
||||
|
||||
### Possible usage with [actions/checkout](https://github.com/actions/checkout):
|
||||
### Other supported events
|
||||
|
||||
See [.github/workflows/test.yml](https://github.com/tj-actions/branch-names/blob/main/.github/workflows/test.yml) for more examples.
|
||||
|
||||
### Possible usage with [actions/checkout](https://github.com/actions/checkout)
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@ -233,8 +264,8 @@ on:
|
||||
steps:
|
||||
- name: Get branch names.
|
||||
id: branch-names
|
||||
uses: tj-actions/branch-names@v7
|
||||
- uses: actions/checkout@v3
|
||||
uses: tj-actions/branch-names@v8
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.branch-names.outputs.head_ref_branch }}
|
||||
```
|
||||
@ -270,6 +301,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/loarca"><img src="https://avatars.githubusercontent.com/u/22898638?v=4?s=100" width="100px;" alt="Alejandro Loarca"/><br /><sub><b>Alejandro Loarca</b></sub></a><br /><a href="https://github.com/tj-actions/branch-names/commits?author=loarca" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://ianwoodard.me"><img src="https://avatars.githubusercontent.com/u/17186604?v=4?s=100" width="100px;" alt="Ian Woodard"/><br /><sub><b>Ian Woodard</b></sub></a><br /><a href="https://github.com/tj-actions/branch-names/commits?author=IanWoodard" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://home.boidol.dev/"><img src="https://avatars.githubusercontent.com/u/652404?v=4?s=100" width="100px;" alt="Raphael Boidol"/><br /><sub><b>Raphael Boidol</b></sub></a><br /><a href="https://github.com/tj-actions/branch-names/commits?author=boidolr" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
32
SECURITY.md
Normal file
32
SECURITY.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Security Policy
|
||||
|
||||
## Proactive Security Measures
|
||||
|
||||
To proactively detect and address security vulnerabilities, we utilize several robust tools and processes:
|
||||
|
||||
- **Dependency Updates:** We use [Renovate](https://renovatebot.com) and [Dependabot](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) to keep our dependencies updated and promptly patch detected vulnerabilities through automated PRs.
|
||||
- **[GitHub's Security Features](https://github.com/features/security):** Our repository and dependencies are continuously monitored via GitHub's security features, which include:
|
||||
- **Code Scanning:** Using GitHub's CodeQL, all pull requests are scanned to identify potential vulnerabilities in our source code.
|
||||
- **Automated Alerts:** Dependabot identifies vulnerabilities based on the GitHub Advisory Database and opens PRs with patches, while automated [secret scanning](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns) provides alerts for detected secrets.
|
||||
- **[GitGuardian Security Checks](https://www.gitguardian.com/):** We employ GitGuardian to ensure security checks are performed on the codebase, enhancing the overall security of our project.
|
||||
- **Code Analysis and Security Scanning:** With the help of [Codacy Static Code Analysis](https://www.codacy.com/) and [Codacy Security Scan](https://security.codacy.com/), we conduct thorough analyses and scans of our code for potential security risks.
|
||||
|
||||
## Reporting Security Vulnerabilities
|
||||
|
||||
Despite our best efforts to deliver secure software, we acknowledge the invaluable role of the community in identifying security breaches.
|
||||
|
||||
### Private Vulnerability Disclosures
|
||||
|
||||
We request all suspected vulnerabilities to be responsibly and privately disclosed by sending an email to [support@tj-actions.online](mailto:support@tj-actions.online).
|
||||
|
||||
### Public Vulnerability Disclosures
|
||||
|
||||
For publicly disclosed security vulnerabilities, please **IMMEDIATELY** email [support@tj-actions.online](mailto:support@tj-actions.online) with the details for prompt action.
|
||||
|
||||
Upon confirmation of a breach, reporters will receive full credit and recognition for their contribution. Please note, that we do not offer monetary compensation for reporting vulnerabilities.
|
||||
|
||||
## Communication of Security Breaches
|
||||
|
||||
We will utilize the [GitHub Security Advisory](https://github.com/tj-actions/branch-names/security/advisories) to communicate any security breaches. The advisory will be made public once a patch has been released to rectify the issue.
|
||||
|
||||
We appreciate your cooperation and contribution to maintaining the security of our software. Remember, a secure community is a strong community.
|
108
action.yml
108
action.yml
@ -37,100 +37,82 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: branch
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref || github.base_ref }}
|
||||
GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref || github.head_ref }}
|
||||
GITHUB_EVENT_BASE_REF: ${{ github.event.base_ref }}
|
||||
INPUTS_STRIP_TAG_PREFIX: ${{ inputs.strip_tag_prefix }}
|
||||
run: |
|
||||
# "Set branch names..."
|
||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||
BASE_REF=$(printf "%q" "${{ github.event.pull_request.base.ref || github.base_ref }}")
|
||||
HEAD_REF=$(printf "%q" "${{ github.event.pull_request.head.ref || github.head_ref }}")
|
||||
REF=$(printf "%q" "${{ github.ref }}")
|
||||
if [[ "$GITHUB_REF" != "refs/tags/"* ]]; then
|
||||
BASE_REF=$(printf "%q" "$GITHUB_BASE_REF")
|
||||
HEAD_REF=$(printf "%q" "$GITHUB_HEAD_REF")
|
||||
REF=$(printf "%q" "$GITHUB_REF")
|
||||
|
||||
BASE_REF=${BASE_REF/refs\/heads\//}
|
||||
HEAD_REF=${HEAD_REF/refs\/heads\//}
|
||||
REF_BRANCH=${REF/refs\/pull\//}
|
||||
REF_BRANCH=${REF_BRANCH/refs\/heads\//}
|
||||
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")"
|
||||
echo "::set-output name=head_ref_branch::$(eval printf "%s" "$HEAD_REF")"
|
||||
echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
|
||||
else
|
||||
echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
||||
echo "head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
|
||||
echo "ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
||||
echo "head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
|
||||
echo "ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
BASE_REF=$(printf "%q" "${{ github.event.base_ref }}")
|
||||
BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/}
|
||||
BASE_REF=$(printf "%q" "$GITHUB_EVENT_BASE_REF")
|
||||
BASE_REF=${BASE_REF/refs\/heads\/$INPUTS_STRIP_TAG_PREFIX/}
|
||||
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")"
|
||||
else
|
||||
echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
shell: bash
|
||||
- id: current_branch
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
||||
HEAD_REF_BRANCH: ${{ steps.branch.outputs.head_ref_branch }}
|
||||
REF_BRANCH: ${{ steps.branch.outputs.ref_branch }}
|
||||
run: |
|
||||
# "Set the current branch name..."
|
||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||
if [[ ${{ github.event_name }} == *"pull_request"* ]]; then
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
|
||||
else
|
||||
echo "current_branch=${{ steps.branch.outputs.head_ref_branch }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
if [[ "$GITHUB_REF" != "refs/tags/"* ]]; then
|
||||
if [[ "$GITHUB_EVENT_NAME" == *"pull_request"* ]]; then
|
||||
echo "current_branch=$HEAD_REF_BRANCH" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
|
||||
else
|
||||
echo "current_branch=${{ steps.branch.outputs.ref_branch }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "current_branch=$REF_BRANCH" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
shell: bash
|
||||
- id: default
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
CURRENT_BRANCH: ${{ steps.current_branch.outputs.current_branch }}
|
||||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||
run: |
|
||||
# "Set the default branch name..."
|
||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ github.event.repository.default_branch }}" && "${{ github.event.pull_request.head.repo.fork }}" != "true" ]]; then
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=is_default::true"
|
||||
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
||||
else
|
||||
echo "is_default=true" >> "$GITHUB_OUTPUT"
|
||||
echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
if [[ "$GITHUB_REF" != "refs/tags/"* ]]; then
|
||||
if [[ "$CURRENT_BRANCH" == "$DEFAULT_BRANCH" && "$FORK" != "true" ]]; then
|
||||
echo "is_default=true" >> "$GITHUB_OUTPUT"
|
||||
echo "default_branch=$DEFAULT_BRANCH" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=is_default::false"
|
||||
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
||||
else
|
||||
echo "is_default=false" >> "$GITHUB_OUTPUT"
|
||||
echo "default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "is_default=false" >> "$GITHUB_OUTPUT"
|
||||
echo "default_branch=$DEFAULT_BRANCH" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
shell: bash
|
||||
- id: tag
|
||||
env:
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
INPUTS_STRIP_TAG_PREFIX: ${{ inputs.strip_tag_prefix }}
|
||||
run: |
|
||||
# "Set the tag name..."
|
||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||
REF=$(printf "%q" "${{ github.ref }}")
|
||||
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
||||
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
|
||||
REF=$(printf "%q" "$GITHUB_REF")
|
||||
TAG="${REF/refs\/tags\/$INPUTS_STRIP_TAG_PREFIX/}"
|
||||
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=tag::$(eval printf "%s" "$TAG")"
|
||||
echo "::set-output name=is_tag::true"
|
||||
else
|
||||
echo "tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
|
||||
echo "is_tag=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
|
||||
echo "is_tag=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||
echo "::set-output name=is_tag::false"
|
||||
else
|
||||
echo "is_tag=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
echo "is_tag=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user