You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: .github/workflows/backport-action.yml
+52-16Lines changed: 52 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
1
name: Launch Backport Job
2
-
3
2
on:
4
3
workflow_call:
5
4
inputs:
@@ -40,40 +39,65 @@ on:
40
39
github_account_pat:
41
40
description: PAT for a github account that has write access to source repository
42
41
required: true
43
-
44
42
jobs:
45
43
launch_ado_build:
46
44
runs-on: ubuntu-latest
45
+
env:
46
+
# Protect against script injection attacks via input variables (i.e., the content of the variables could be executed at the time of evaluation/expansion within a script)
47
+
# Scripts must consume the environment variable settings instead
$message = "Backport Job to branch **$($parameters.BackportTargetBranch)** Created! The magic is happening [here](https://dev.azure.com/${{ secrets.ado_organization }}/${{ secrets.ado_project }}/_build/results?buildId=$($responseJson.id))"
154
+
$message = "Backport Job to branch **$($parameters.BackportTargetBranch)** Created! The magic is happening [here](https://dev.azure.com/${adoOrganization}/${adoProject}/_build/results?buildId=$($responseJson.id))"
119
155
} catch {
120
156
Write-Host $_.Exception.Message
121
157
$message = "I couldn't create a backport to **$($parameters.BackportTargetBranch)** for you. :( Please check the Action logs for more details."
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
13
13
Any use of third-party trademarks or logos are subject to those third-party's policies.
14
14
15
15
16
-
## Deploying
16
+
## Testing
17
+
18
+
You can test changes from your topic branch (PR branch) by using the `v1.0-test` tag. Associate the tag with your latest changes by performing the following steps
19
+
20
+
```
21
+
git checkout [TOPIC_BRANCH_NAME]
22
+
git tag -f v1.0-test
23
+
git push --tags --force
24
+
```
25
+
26
+
To excercise your changes associated with the `v1.0-test` tag, use the following test PR
Release management of the backport bot action is done though git tags. At present, the current release can be found at `v1.0`.
35
+
See the [test PR](https://github.com/xamarin/backport-bot-action/pull/11) for additional guidance & details
36
+
37
+
## Deploying
19
38
20
-
For Staging, please use the `v1.0-alpha` tag or create a new tag specific to your PR, especially if there are multiple changes in flight.
39
+
Release management of the backport bot action is done though git tags. At present, the current release can be found at `v1.1`.
21
40
22
41
To deploy your changes, please:
23
42
@@ -30,7 +49,7 @@ git tag -f $TAG_NAME
30
49
```bash
31
50
git push --tags
32
51
```
33
-
Please note that for updating the `v1.0` tag (or any other tag you want to push if it already exists), you will need to `push --force` to overwrite the existing tag.
52
+
Please note that for updating the `v1.1` tag (or any other tag you want to push if it already exists), you will need to `push --force` to overwrite the existing tag.
34
53
35
54
In order to pick up the changes for Staging, make sure that the backport trigger YAML in your target repo (usually found at https://github.com/xamarin/$REPO_NAME/blob/main/.github/workflows/backport-trigger.yml) points to your desired tag.
36
55
@@ -39,3 +58,9 @@ For example, https://github.com/xamarin/.github/blob/main/.github/workflows/back
39
58
- uses: xamarin/backport-bot-action@$TAG_NAME
40
59
```
41
60
where `$TAG_NAME` is filled in with the actual name of the tag.
61
+
62
+
You can list tags by executing the following command
# Protect against script injection attacks via input variables (i.e., the content of the variables could be executed at the time of evaluation/expansion within a script)
42
+
# Scripts must consume the environment variable settings instead
$message = "Backport Job to branch **$($parameters.BackportTargetBranch)** Created! The magic is happening [here](https://dev.azure.com/${{ inputs.ado_organization }}/${{ inputs.ado_project }}/_build/results?buildId=$($responseJson.id))"
157
+
$message = "Backport Job to branch **$($parameters.BackportTargetBranch)** Created! The magic is happening [here](https://dev.azure.com/${adoOrganization}/${adoProject}/_build/results?buildId=$($responseJson.id))"
116
158
} catch {
117
159
Write-Host $_.Exception.Message
118
160
$message = "I couldn't create a backport to **$($parameters.BackportTargetBranch)** for you. :( Please check the Action logs for more details."
0 commit comments