Skip to content

Update module github.com/IBM/ibm-cos-sdk-go to v1.13.0 #360

Update module github.com/IBM/ibm-cos-sdk-go to v1.13.0

Update module github.com/IBM/ibm-cos-sdk-go to v1.13.0 #360

Workflow file for this run

name: CI & Release
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
common-setup:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.check_release.outputs.should_release }}
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Print Go Version
run: go version
- name: Get last commit message
id: check_commit
run: |
message=$(git log -1 --pretty=%B)
message="${message//'%'/'%25'}" # Escape '%'
message="${message//$'\n'/'%0A'}" # Escape newlines
message="${message//$'\r'/'%0D'}" # Escape carriage returns
echo "message=$message" >> "$GITHUB_OUTPUT"
shell: bash
- name: Check Commit Message
run: |
echo "Commit Message: ${{ steps.check_commit.outputs.message }}"
- name: Check if release should be triggered
id: check_release
run: |
if [[ "${{ steps.check_commit.outputs.message }}" == *"publish"* ]]; then
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "Debian/RPM packages will be created"
else
echo "should_release=false" >> "$GITHUB_OUTPUT"
echo "Debian/RPM packages will not be created"
fi
build-and-test:
needs: common-setup
runs-on: ubuntu-latest
permissions:
contents: write # needed to push coverage to gh-pages
pull-requests: write # needed to comment on PRs
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install system dependencies (bc + docker)
run: |
sudo apt-get update -qq
sudo apt-get install -y bc docker-ce-cli
- name: Prepare environment
run: |
export GO111MODULE=on
go mod tidy
make deps
- name: Check code formatting
run: make fmt
- name: Run unit tests
run: make test
- name: Generate coverage
run: |
make coverage
./scripts/calculateCoverage.sh
touch "Passing" || touch "Failed"
- name: Build driver image
run: |
make driver
env:
RHSM_USER: ${{ secrets.RHSM_USER }}
RHSM_PASS: ${{ secrets.RHSM_PASS }}
- name: Publish coverage
if: success()
env:
GHE_TOKEN: ${{ secrets.GHE_TOKEN }}
run: |
./scripts/publishCoverage.sh
release:
needs: common-setup
if: needs.common-setup.outputs.should_release == 'true'
permissions: write-all
runs-on: ubuntu-latest
strategy:
matrix:
package_dir:
- cos-csi-mounter
env:
IS_LATEST_RELEASE: 'true'
APP_VERSION: 1.0.5
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
- name: Build Debian and RPM packages for cos-csi-mounter systemd service
run: |
cd ${{ matrix.package_dir }}
make packages
- name: Latest Version (Tag and Release)
if: success()
id: release
uses: softprops/action-gh-release@v2
with:
files: |
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.deb.tar.gz
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.deb.tar.gz.sha256
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.rpm.tar.gz
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.rpm.tar.gz.sha256
tag_name: v1.0.5
name: v1.0.5
body: |
## 🚀 What’s New
- Fix for rclone mount hang issue
- Add support for s3fs disable_noobj_cache flag
- Skip unmount for 'is not a mountpoint' error
prerelease: ${{ env.IS_LATEST_RELEASE != 'true' }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3