File tree 4 files changed +60
-4
lines changed
4 files changed +60
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Create and publish a Docker image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - " v*"
9
+ workflow_dispatch :
10
+
11
+ env :
12
+ REGISTRY : ghcr.io
13
+ IMAGE_NAME : ${{ github.repository }}
14
+
15
+ jobs :
16
+ build-and-push-image :
17
+ runs-on : ubuntu-latest
18
+ permissions :
19
+ contents : read
20
+ packages : write
21
+ attestations : write
22
+ id-token : write
23
+ steps :
24
+ - name : Checkout repository
25
+ uses : actions/checkout@v4
26
+ - name : Log in to the Container registry
27
+ uses : docker/login-action@v3
28
+ with :
29
+ registry : ${{ env.REGISTRY }}
30
+ username : ${{ github.actor }}
31
+ password : ${{ secrets.GITHUB_TOKEN }}
32
+ - name : Extract metadata (tags, labels) for Docker
33
+ id : meta
34
+ uses : docker/metadata-action@v5
35
+ with :
36
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37
+ -
uses :
benjlevesque/[email protected]
38
+ id : short-sha
39
+ with :
40
+ length : 7
41
+ - name : Build and push Docker image
42
+ id : push
43
+ uses : docker/build-push-action@v6
44
+ with :
45
+ context : .
46
+ push : ${{ github.event_name != 'pull_request' }}
47
+ tags : |
48
+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
49
+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.short-sha.outputs.sha }}
50
+ labels : ${{ steps.meta.outputs.labels }}
51
+ - name : Generate artifact attestation
52
+ uses : actions/attest-build-provenance@v2
53
+ with :
54
+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
55
+ subject-digest : ${{ steps.push.outputs.digest }}
56
+ push-to-registry : true
Original file line number Diff line number Diff line change 9
9
# File Created: 2025-03-05 11:10:40
10
10
#
11
11
# Modified By: mingcheng ([email protected] )
12
- # Last Modified: 2025-03-17 18:29:18
12
+ # Last Modified: 2025-03-18 11:56:05
13
13
# #
14
14
15
15
name : Cargo Build & Test
Original file line number Diff line number Diff line change 9
9
* File Created: 2025-03-01 17:17:30
10
10
*
11
11
* Modified By: mingcheng ([email protected] )
12
- * Last Modified: 2025-03-17 18:29:42
12
+ * Last Modified: 2025-03-18 11:56:08
13
13
*/
14
14
15
15
use aigitcommit:: cli:: Cli ;
Original file line number Diff line number Diff line change 9
9
* File Created: 2025-03-01 21:55:58
10
10
*
11
11
* Modified By: mingcheng ([email protected] )
12
- * Last Modified: 2025-03-06 17:59:08
12
+ * Last Modified: 2025-03-17 22:53:48
13
13
*/
14
14
use askama:: Template ;
15
15
use async_openai:: config:: OPENAI_API_BASE ;
@@ -66,7 +66,7 @@ impl OpenAI {
66
66
} ) ;
67
67
68
68
// Set up proxy if specified
69
- let proxy_addr: String = env:: var ( "OPENAI_APT_PROXY " ) . unwrap_or_else ( |_| String :: from ( "" ) ) ;
69
+ let proxy_addr: String = env:: var ( "OPENAI_API_PROXY " ) . unwrap_or_else ( |_| String :: from ( "" ) ) ;
70
70
if !proxy_addr. is_empty ( ) {
71
71
trace ! ( "Using proxy: {}" , proxy_addr) ;
72
72
http_client_builder = http_client_builder. proxy ( Proxy :: all ( proxy_addr) . unwrap ( ) ) ;
You can’t perform that action at this time.
0 commit comments