Skip to content

Commit a4bd894

Browse files
committed
removing extra stages
1 parent cc9e8a2 commit a4bd894

File tree

3 files changed

+10
-133
lines changed

3 files changed

+10
-133
lines changed

.github/workflows/deploy_to_ghcr.yml

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ jobs:
3232
id: meta
3333
uses: docker/metadata-action@v5
3434
with:
35-
images: ghcr.io/${{ github.repository }}
35+
# this is back a single image, `-with-proxy` is legacy and will be removed
36+
images: |
37+
ghcr.io/${{ github.repository }}
38+
ghcr.io/${{ github.repository }}-with-proxy
3639
labels: |
3740
org.opencontainers.image.title=copilot-metrics-viewer
3841
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
@@ -52,47 +55,6 @@ jobs:
5255
labels: ${{ steps.meta.outputs.labels }}
5356
push: true
5457

55-
push_proxy_to_ghcr:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- name: Checkout GitHub Action
59-
uses: actions/checkout@v4
60-
61-
- name: Login to GitHub Container Registry
62-
uses: docker/login-action@v3
63-
with:
64-
registry: ghcr.io
65-
username: ${{ github.actor }}
66-
password: ${{ secrets.GITHUB_TOKEN }}
67-
68-
# Adding below tag any push to main as "latest"
69-
# To deploy latest, create a release with a semver tag
70-
# type=raw,value=latest,enable={{is_default_branch}}
71-
- name: Extract metadata
72-
id: meta
73-
uses: docker/metadata-action@v5
74-
with:
75-
images: ghcr.io/${{ github.repository }}-with-proxy
76-
labels: |
77-
org.opencontainers.image.title=copilot-metrics-viewer-with-proxy
78-
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
79-
org.opencontainers.image.source=${{ github.repository }}
80-
tags: |
81-
type=sha
82-
type=ref,event=branch
83-
type=ref,event=pr
84-
type=semver,pattern={{version}}
85-
type=semver,pattern={{major}}.{{minor}}
86-
87-
- name: Build and push api
88-
uses: docker/build-push-action@v5
89-
with:
90-
context: .
91-
file: api.Dockerfile
92-
tags: ${{ steps.meta.outputs.tags }}
93-
labels: ${{ steps.meta.outputs.labels }}
94-
push: true
95-
9658
deploy:
9759
runs-on: ubuntu-latest
9860
needs: push_to_ghcr

.github/workflows/deploy_to_ghcr_custom_tag.yaml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
id: meta
3434
uses: docker/metadata-action@v5
3535
with:
36-
images: ghcr.io/${{ github.repository }}
36+
images: |
37+
ghcr.io/${{ github.repository }}
38+
ghcr.io/${{ github.repository }}-with-proxy
3739
labels: |
3840
org.opencontainers.image.title=copilot-metrics-viewer
3941
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
@@ -53,47 +55,3 @@ jobs:
5355
tags: ${{ steps.meta.outputs.tags }}
5456
labels: ${{ steps.meta.outputs.labels }}
5557
push: true
56-
57-
push_proxy_to_ghcr:
58-
runs-on: ubuntu-latest
59-
steps:
60-
- name: Checkout GitHub Action
61-
uses: actions/checkout@v4
62-
with:
63-
fetch-depth: 0 # Fetch all history for all tags and branches
64-
ref: ${{ github.event.inputs.tag }}
65-
66-
67-
- name: Login to GitHub Container Registry
68-
uses: docker/login-action@v3
69-
with:
70-
registry: ghcr.io
71-
username: ${{ github.actor }}
72-
password: ${{ secrets.GITHUB_TOKEN }}
73-
74-
- name: Extract metadata
75-
id: meta
76-
uses: docker/metadata-action@v5
77-
with:
78-
images: ghcr.io/${{ github.repository }}-with-proxy
79-
labels: |
80-
org.opencontainers.image.title=copilot-metrics-viewer-with-proxy
81-
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
82-
org.opencontainers.image.source=${{ github.repository }}
83-
tags: |
84-
type=raw,enable=true,priority=1,value=${{ github.event.inputs.tag }}
85-
type=sha
86-
type=ref,event=branch
87-
type=ref,event=pr
88-
type=semver,pattern={{version}}
89-
type=semver,pattern={{major}}.{{minor}}
90-
91-
- name: Build and push api
92-
uses: docker/build-push-action@v5
93-
with:
94-
context: .
95-
file: api.Dockerfile
96-
tags: ${{ steps.meta.outputs.tags }}
97-
labels: ${{ steps.meta.outputs.labels }}
98-
push: true
99-

.github/workflows/deploy_to_ghcr_tag_release.yaml

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ jobs:
3838
exit 1
3939
fi
4040
41-
cd api
42-
npm version from-git --no-git-tag-version
43-
cd ..
4441
git add .
4542
git commit --signoff --message $version
4643
@@ -80,7 +77,9 @@ jobs:
8077
id: meta
8178
uses: docker/metadata-action@v5
8279
with:
83-
images: ghcr.io/${{ github.repository }}
80+
images: |
81+
ghcr.io/${{ github.repository }}
82+
ghcr.io/${{ github.repository }}-with-proxy
8483
labels: |
8584
org.opencontainers.image.title=copilot-metrics-viewer
8685
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
@@ -99,45 +98,3 @@ jobs:
9998
tags: ${{ steps.meta.outputs.tags }}
10099
labels: ${{ steps.meta.outputs.labels }}
101100
push: true
102-
103-
push_proxy_to_ghcr:
104-
runs-on: ubuntu-latest
105-
needs: version_update
106-
steps:
107-
- name: Checkout GitHub Action
108-
uses: actions/checkout@v4
109-
with:
110-
ref: ${{ github.event.release.tag_name }}
111-
112-
- name: Login to GitHub Container Registry
113-
uses: docker/login-action@v3
114-
with:
115-
registry: ghcr.io
116-
username: ${{ github.actor }}
117-
password: ${{ secrets.GITHUB_TOKEN }}
118-
119-
- name: Extract metadata
120-
id: meta
121-
uses: docker/metadata-action@v5
122-
with:
123-
images: ghcr.io/${{ github.repository }}-with-proxy
124-
labels: |
125-
org.opencontainers.image.title=copilot-metrics-viewer-with-proxy
126-
org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage
127-
org.opencontainers.image.source=${{ github.repository }}
128-
tags: |
129-
type=sha
130-
type=ref,event=branch
131-
type=ref,event=pr
132-
type=semver,pattern={{version}}
133-
type=semver,pattern={{major}}.{{minor}}
134-
135-
- name: Build and push api
136-
uses: docker/build-push-action@v5
137-
with:
138-
context: .
139-
file: api.Dockerfile
140-
tags: ${{ steps.meta.outputs.tags }}
141-
labels: ${{ steps.meta.outputs.labels }}
142-
push: true
143-

0 commit comments

Comments
 (0)