Skip to content

Commit a0d99ab

Browse files
committed
chore(ci): push image
1 parent fe58e23 commit a0d99ab

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ on:
44
branches:
55
- "main"
66
- "release/v*"
7+
- "v1.5.4-dns-all"
78
paths-ignore:
89
- "**/*.png"
910
pull_request:
1011
branches:
1112
- "main"
1213
- "release/v*"
14+
- "v1.5.4-dns-all"
1315
paths-ignore:
1416
- "**/*.png"
1517

1618
permissions:
1719
contents: read
20+
packages: write
1821

1922
jobs:
2023
lint:
@@ -55,6 +58,7 @@ jobs:
5558
- name: Run Coverage Tests
5659
run: make go.test.coverage
5760
- name: Upload coverage to Codecov
61+
if: github.ref != 'refs/heads/v1.5.4-dns-all'
5862
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
5963
with:
6064
fail_ci_if_error: true
@@ -249,21 +253,34 @@ jobs:
249253
250254
# build and push image
251255
- name: Login to DockerHub
252-
if: github.event_name == 'push'
256+
if: github.event_name == 'push' && github.ref != 'refs/heads/v1.5.4-dns-all'
253257
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
254258
with:
255259
username: ${{ vars.DOCKERHUB_USERNAME }}
256260
password: ${{ secrets.DOCKERHUB_PASSWORD }}
257261

262+
- name: Login to GHCR
263+
if: github.event_name == 'push' && github.ref == 'refs/heads/v1.5.4-dns-all'
264+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
265+
with:
266+
registry: ghcr.io
267+
username: ${{ github.actor }}
268+
password: ${{ secrets.GITHUB_TOKEN }}
269+
258270
- name: Setup Multiarch Environment
259271
if: github.event_name == 'push'
260272
run: make image.multiarch.setup
261273

262-
- name: Build and Push EG Commit Image
263-
if: github.event_name == 'push'
274+
- name: Build and Push EG Commit Image (DockerHub)
275+
if: github.event_name == 'push' && github.ref != 'refs/heads/v1.5.4-dns-all'
264276
# tag is set to the short SHA of the commit
265277
run: make image.push.multiarch PLATFORMS="linux_amd64 linux_arm64" IMAGE=envoyproxy/gateway-dev
266278

279+
- name: Build and Push EG Commit Image (GHCR)
280+
if: github.event_name == 'push' && github.ref == 'refs/heads/v1.5.4-dns-all'
281+
# tag is set to v1.5.4-ipv6 for this branch
282+
run: make image.push.multiarch PLATFORMS="linux_amd64 linux_arm64" IMAGE=ghcr.io/tosuke-lab/envoy-gateway TAG=v1.5.4-ipv6
283+
267284
- name: Build and Push EG Latest Image
268285
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
269286
# tag is set to `latest` when pushing to main branch

0 commit comments

Comments
 (0)