Skip to content

Commit 4cec7ef

Browse files
committed
.
1 parent 56da993 commit 4cec7ef

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ref": "develop",
33
"inputs": {
4-
"source-url-tag": "gcr.io/project-id-372417/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
5-
"target-url": "gcr.io/project-id-372417/target-image"
4+
"source-url-tag": "gcr.io/project-id/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
5+
"target-url": "gcr.io/project-id/target-image"
66
}
77
}

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,45 @@ Provides GitHub Workflow and Action samples.
6565
| [google-github-actions/auth@v1](https://github.com/google-github-actions/auth) | GitHub Action authenticates to Google Cloud |
6666
| [EnricoMi/publish-unit-test-result-action/composite@v2](https://github.com/EnricoMi/publish-unit-test-result-action) | Publish Test Results |
6767

68-
6968
## Dispatch
7069

70+
```bash
71+
cp .github/workflows/dispatch-request-exmple.json request-body.json
72+
cat request-body.json
73+
74+
curl -d @request-body.json \
75+
-H "Accept: application/vnd.github.v3+json" \
76+
-H "Authorization: <your-token>" \
77+
https://github.com/DevSecOpsSamples/githubactions/actions/workflows/dispatch-example.yml/dispatches
78+
```
79+
80+
develop branch:
81+
82+
[.github/workflows/dispatch-request-exmple.json](.github/workflows/dispatch-request-exmple.json)
83+
84+
```json
85+
{
86+
"ref": "develop",
87+
"inputs": {
88+
"test-url-tag": "gcr.io/project-id/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
89+
"prod-url": "gcr.io/project-id/target-image"
90+
}
91+
}
92+
```
93+
94+
master branch:
95+
96+
```json
97+
{
98+
"ref": "develop",
99+
"inputs": {
100+
"test-url-tag": "gcr.io/project-id/source-image:2650c2f7c04640b8c67df560510914f7ba2033e2",
101+
"prod-url": "gcr.io/project-id/target-image"
102+
}
103+
}
104+
```
105+
106+
71107
## Reference
72108

73109
- [GitHub Actions /Using workflows / Cache dependencies / Caching dependencies to speed up workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches)

0 commit comments

Comments
 (0)