Skip to content

Commit d62649b

Browse files
committed
DOC: Update readme with non-main branch deployment info
skipci
1 parent ce5c9aa commit d62649b

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# Get deployment info
66

7-
A GitHub action that gets the information needed to build and deploy an Octue service to the cloud. This information is
8-
extracted and/or generated from:
7+
A GitHub action that gets the information needed to build and deploy an Octue service to the cloud from a
8+
main/production branch or a non-main/development branch. The required information is extracted and/or generated from:
99

1010
- The action inputs
1111
- `git`
@@ -25,7 +25,7 @@ steps:
2525

2626
- name: Get deployment info
2727
id: get-deployment-info
28-
uses: octue/[email protected].1
28+
uses: octue/[email protected].2
2929
with:
3030
gcp_project_name: test-project
3131
gcp_project_number: 1234
@@ -48,6 +48,8 @@ Outputs can be accessed in the usual way. For example, to print all the outputs:
4848
echo ${{ steps.get-deployment-info.outputs.image_version_tag }}
4949
echo ${{ steps.get-deployment-info.outputs.short_sha }}
5050
echo ${{ steps.get-deployment-info.outputs.version_slug }}
51+
echo ${{ steps.get-deployment-info.outputs.revision_tag }}
52+
echo ${{ steps.get-deployment-info.outputs.revision_tag_slug }}
5153
echo ${{ steps.get-deployment-info.outputs.gcp_environment }}
5254
echo ${{ steps.get-deployment-info.outputs.gcp_project_name }}
5355
echo ${{ steps.get-deployment-info.outputs.gcp_project_number }}
@@ -59,3 +61,22 @@ Outputs can be accessed in the usual way. For example, to print all the outputs:
5961
6062
Note: there's no need to print the outputs for debugging in practice - the action prints them to `stdout` for this very
6163
purpose.
64+
65+
## Main vs non-main branch deployments
66+
67+
Some of the outputs' values depend on whether the action is run on the `main` branch or a non-`main` branch.
68+
69+
### Main branch deployments
70+
71+
- `revision_tag` is `<version>`
72+
- `image_version_tag` is `<branch_tag_kebab>-<version>`
73+
- `image_latest_tag` is `<branch_tag_kebab>-latest`
74+
75+
### Non-main branch deployments
76+
77+
The truncated branch name (first 12 characters) is used to ensure service names are short enough to be accepted by e.g.
78+
Cloud Run without having to restrict the length of branch names.
79+
80+
- `revision_tag` is `pull-<truncated branch_tag_kebab>`
81+
- `image_version_tag` is `pull-<truncated branch_tag_kebab>`
82+
- `image_latest_tag` is `pull-<truncated branch_tag_kebab>-latest`

0 commit comments

Comments
 (0)