From 97ab03e3ce34f4aa487e4621e5bc090cc626fee4 Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 30 Jul 2024 11:16:58 +0800 Subject: [PATCH] ci: release latest image to ghcr.io (#4) **Please provide a description of this PR:** --------- Signed-off-by: zirain --- .github/workflows/release-latest.yaml | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release-latest.yaml diff --git a/.github/workflows/release-latest.yaml b/.github/workflows/release-latest.yaml new file mode 100644 index 0000000000..d64119627e --- /dev/null +++ b/.github/workflows/release-latest.yaml @@ -0,0 +1,60 @@ +name: Release Latest + +on: + push: + branches: + - "main" + +permissions: + contents: read + packages: write + +jobs: + build-check: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.1 + with: + go-version: 1.22.x + cache: true + # enable modules that needed by Istio Dual Stack + - run: make lint + - run: make test + - run: make build + + e2e: + name: e2e + runs-on: ubuntu-latest + needs: build-check + env: + HUB: ghcr.io/istio-ecosystem + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.1 + with: + go-version: 1.22.x + cache: true + - run: go install github.com/jstemmer/go-junit-report@latest + # run e2e tests + - run: prow/integ-suite-kind.sh test.integration.kube + env: + BUILD_WITH_CONTAINER: 0 + TAG: "1.22.3" # keep this with latest istio version + + release: + name: Release Latest Image + runs-on: ubuntu-latest + needs: e2e + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.1 + with: + go-version: 1.22.x + cache: true + - run: make docker.push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HUB: ghcr.io/istio-ecosystem + TAG: "latest"