mirror of
https://github.com/fosrl/olm.git
synced 2026-02-26 14:56:46 +00:00
60
.github/workflows/cicd.yml
vendored
60
.github/workflows/cicd.yml
vendored
@@ -101,7 +101,7 @@ jobs:
|
|||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up 1.2.0 Buildx
|
||||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
@@ -164,6 +164,16 @@ jobs:
|
|||||||
echo "Tag ${TAG} not visible after waiting"; exit 1
|
echo "Tag ${TAG} not visible after waiting"; exit 1
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Update version in main.go
|
||||||
|
run: |
|
||||||
|
TAG=${{ env.TAG }}
|
||||||
|
if [ -f main.go ]; then
|
||||||
|
sed -i 's/version_replaceme/'"$TAG"'/' main.go
|
||||||
|
echo "Updated main.go with version $TAG"
|
||||||
|
else
|
||||||
|
echo "main.go not found"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Ensure repository is at the tagged commit (dispatch only)
|
- name: Ensure repository is at the tagged commit (dispatch only)
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -576,28 +586,28 @@ jobs:
|
|||||||
# sarif_file: trivy-ghcr.sarif
|
# sarif_file: trivy-ghcr.sarif
|
||||||
# category: Image Vulnerability Scan
|
# category: Image Vulnerability Scan
|
||||||
|
|
||||||
- name: Build binaries
|
# - name: Build binaries
|
||||||
env:
|
# env:
|
||||||
CGO_ENABLED: "0"
|
# CGO_ENABLED: "0"
|
||||||
GOFLAGS: "-trimpath"
|
# GOFLAGS: "-trimpath"
|
||||||
run: |
|
# run: |
|
||||||
set -euo pipefail
|
# set -euo pipefail
|
||||||
TAG_VAR="${TAG}"
|
# TAG_VAR="${TAG}"
|
||||||
make go-build-release tag=$TAG_VAR
|
# make go-build-release tag=$TAG_VAR
|
||||||
shell: bash
|
# shell: bash
|
||||||
|
|
||||||
- name: Create GitHub Release
|
# - name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
|
# uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
|
||||||
with:
|
# with:
|
||||||
tag_name: ${{ env.TAG }}
|
# tag_name: ${{ env.TAG }}
|
||||||
generate_release_notes: true
|
# generate_release_notes: true
|
||||||
prerelease: ${{ env.IS_RC == 'true' }}
|
# prerelease: ${{ env.IS_RC == 'true' }}
|
||||||
files: |
|
# files: |
|
||||||
bin/*
|
# bin/*
|
||||||
fail_on_unmatched_files: true
|
# fail_on_unmatched_files: true
|
||||||
draft: true
|
# draft: true
|
||||||
body: |
|
# body: |
|
||||||
## Container Images
|
# ## Container Images
|
||||||
- GHCR: `${{ env.GHCR_REF }}`
|
# - GHCR: `${{ env.GHCR_REF }}`
|
||||||
- Docker Hub: `${{ env.DH_REF || 'N/A' }}`
|
# - Docker Hub: `${{ env.DH_REF || 'N/A' }}`
|
||||||
**Digest:** `${{ steps.build.outputs.digest }}`
|
# **Digest:** `${{ steps.build.outputs.digest }}`
|
||||||
|
|||||||
Reference in New Issue
Block a user