File tree Expand file tree Collapse file tree 4 files changed +60
-4
lines changed Expand file tree Collapse file tree 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 99# File Created: 2025-03-05 11:10:40
1010#
1111# Modified By: mingcheng ([email protected] )12- # Last Modified: 2025-03-17 18:29:18
12+ # Last Modified: 2025-03-18 11:56:05
1313# #
1414
1515name : Cargo Build & Test
Original file line number Diff line number Diff line change 99 * File Created: 2025-03-01 17:17:30
1010 *
1111 * Modified By: mingcheng ([email protected] ) 12- * Last Modified: 2025-03-17 18:29:42
12+ * Last Modified: 2025-03-18 11:56:08
1313 */
1414
1515use aigitcommit:: cli:: Cli ;
Original file line number Diff line number Diff line change 99 * File Created: 2025-03-01 21:55:58
1010 *
1111 * Modified By: mingcheng ([email protected] ) 12- * Last Modified: 2025-03-06 17:59:08
12+ * Last Modified: 2025-03-17 22:53:48
1313 */
1414use askama:: Template ;
1515use async_openai:: config:: OPENAI_API_BASE ;
@@ -66,7 +66,7 @@ impl OpenAI {
6666 } ) ;
6767
6868 // 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 ( "" ) ) ;
7070 if !proxy_addr. is_empty ( ) {
7171 trace ! ( "Using proxy: {}" , proxy_addr) ;
7272 http_client_builder = http_client_builder. proxy ( Proxy :: all ( proxy_addr) . unwrap ( ) ) ;
You can’t perform that action at this time.
0 commit comments