This repository was archived by the owner on Aug 28, 2025. It is now read-only.
Update dependency go to v1.24.5 #148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Image creation and publishing | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - renovate/** | |
| pull_request: | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| get-version: | |
| name: Get Cilium version | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate tag | |
| id: tag | |
| run: | | |
| CILIUM_CHECKSUM=$(grep -E 'github.com/cilium/cilium v[0-9]*\.[0-9]*\.[0-9]*$' go.mod) | |
| CILIUM_VERSION=$(sed -s 's|github.com/cilium/cilium v\([0-9]*\.[0-9]*\.[0-9]*\)$|\1|' <<<"${CILIUM_CHECKSUM}") | |
| echo "CILIUM_VERSION=${CILIUM_VERSION}" >> "$GITHUB_OUTPUT" | |
| outputs: | |
| tag: ${{ steps.tag.outputs.CILIUM_VERSION }} | |
| build: | |
| name: Build and push to registry | |
| runs-on: ubuntu-24.04 | |
| needs: [get-version] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Patch this repo so goreleaser thinks is tagged | |
| run: | | |
| git tag ${{ needs.get-version.outputs.tag }} | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run GoReleaser in dry run-mode | |
| if: startsWith(github.ref, 'refs/heads/main') == false | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: latest | |
| args: build --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_ORGANIZATION: ${{ github.repository_owner }} | |
| - name: Run GoReleaser | |
| if: startsWith(github.ref, 'refs/heads/main') == true | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_ORGANIZATION: ${{ github.repository_owner }} |