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
Also add some details on how to contribute to the project.
Signed-off-by: Rustam Abdullaev <rustam@cue.works>
Change-Id: I374f9a40902c32953a8da68f5efa54dea0c882a3
Reviewed-on: https://review.gerrithub.io/c/cue-labs/registry-login-action/+/1232817
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUE porcuepine <cue.porcuepine@gmail.com>
| `update_logins` | Whether to update the local CUE logins.json file | No | `true` |
92
+
|--- | --- | --- | ---|
93
+
| `registry` | The hostname of the CUE registry. | No | `registry.cue.works` |
94
+
| `update_logins` | If `true`, writes credentials to the standard CUE `logins.json` file. | No | `true` |
63
95
64
96
## Outputs
65
97
66
98
| Output | Description |
67
-
|--------|-------------|
68
-
| `access_token` | The access token obtained from the registry |
99
+
|--- | ---|
100
+
| `access_token` | The short-lived OAuth access token obtained from the registry. **This value is masked as a secret in logs.** |
69
101
70
-
## How it works
102
+
## Complete Workflow Example
71
103
72
-
1. Obtains a GitHub OIDC token with the registry URL as the audience
73
-
2. Exchanges the OIDC token for a registry access token
74
-
3. Optionally configures the `cue` CLI with the registry credentials in `~/.config/cue/logins.json`
75
-
76
-
## Example workflow
104
+
This example demonstrates a full release pipeline that publishes a module when a
105
+
tag is pushed.
77
106
78
107
```yaml
79
108
name: Publish CUE module
80
109
81
110
on:
82
-
# Example
83
111
push:
84
-
tags:
85
-
- 'v*'
112
+
tags: ['v*']
86
113
87
114
jobs:
88
115
publish:
89
116
runs-on: ubuntu-latest
90
-
91
-
# Enable GitHub OIDC token
92
117
permissions:
118
+
# Required for OIDC authentication
93
119
id-token: write
120
+
contents: read
94
121
95
122
steps:
96
123
- name: Checkout code
97
124
- uses: actions/checkout@v6
98
125
99
-
# Log into the registry using OIDC
126
+
# Log into the registry (updates ~/.config/cue/logins.json)
100
127
- name: Login to CUE registry
101
128
id: oidc
102
129
uses: cue-labs/registry-login-action@v1
@@ -106,10 +133,17 @@ jobs:
106
133
with:
107
134
go-version: '1.25'
108
135
109
-
- name: Install Cue
136
+
- name: Install CUE
110
137
run: go install cuelang.org/go/cmd/cue@latest
111
138
112
139
- name: Publish module
113
-
run: |
114
-
cue mod publish ${{ github.ref_name }}
140
+
# The 'cue' command is already authenticated by the login action
141
+
run: cue mod publish ${{ github.ref_name }}
142
+
115
143
```
144
+
145
+
## Contributing to the project
146
+
147
+
Report issues via the [CUE project](https://github.com/cue-lang/cue/issues).
148
+
149
+
Code changes are submitted via Gerrit. Refer to the [CUE Contribution Guide](https://github.com/cue-lang/cue/blob/master/CONTRIBUTING.md) for more details.
0 commit comments