File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and push Docker image for Proxy
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+
11
+ permissions :
12
+ packages : write
13
+
14
+ jobs :
15
+ push_to_ghcr :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Checkout GitHub Action
19
+ uses : actions/checkout@v4
20
+
21
+ - name : Login to GitHub Container Registry
22
+ uses : docker/login-action@v3
23
+ with :
24
+ registry : ghcr.io
25
+ username : ${{ github.actor }}
26
+ password : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Build and Push Docker Image
29
+ run : |
30
+ GITHUB_REPO="${GITHUB_REPO,,}-with-proxy" # convert repo name to lowercase as required by docker
31
+ echo "building docker image in repository '$GITHUB_REPO' ..."
32
+ docker build --label "org.opencontainers.image.title=copilot-metrics-viewer-with-proxy" --label "org.opencontainers.image.description=Metrics viewer with proxy for GitHub Copilot usage" --label "org.opencontainers.image.source=$GITHUB_REPO" -t ghcr.io/$GITHUB_REPO:latest .
33
+ docker push ghcr.io/$GITHUB_REPO:latest
34
+ env :
35
+ GITHUB_REPO : ${{ github.repository }}
You can’t perform that action at this time.
0 commit comments