fix(deps): update module google.golang.org/protobuf to v1.36.2 #1267
This file contains 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: pull-request | |
on: | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
jobs: | |
pr-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} # checkout the correct branch name | |
fetch-depth: 0 # fetch the whole repo history | |
- name: Git Version | |
id: auto_version | |
uses: codacy/[email protected] | |
with: | |
prefix: v | |
minor-identifier: /feat(ure)*:/ | |
major-identifier: /breaking:/ | |
- name: Set package version | |
id: version | |
run: | | |
if [[ $INPUT_VERSION ]]; then | |
echo "version=$INPUT_VERSION" >> $GITHUB_OUTPUT | |
else | |
echo "version=${{ steps.auto_version.outputs.version }}" >> $GITHUB_OUTPUT | |
fi | |
# DOCKER BUILD & PUSH | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Quay.io | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: quay.io | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
pull: true | |
tags: '${{ secrets.DOCKER_REGISTRY_NAME }}/csi-wekafs:${{ steps.auto_version.outputs.version }}' | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
labels: | | |
revision=${{ steps.auto_version.outputs.version }} | |
quay.expires-after=14d | |
provenance: false # https://issues.redhat.com/browse/PROJQUAY-5013 quay doesn't support it | |
build-args: | | |
VERSION='${{ steps.auto_version.outputs.version }}' | |
platforms: linux/amd64,linux/arm64 | |
# HELM | |
- name: Get Helm chart version | |
id: helm_version | |
run: | | |
out="$(echo "${{ steps.auto_version.outputs.version }}" | sed 's/^v//1')" | |
echo "helm_version=$out" >> $GITHUB_OUTPUT | |
- name: Update Helm chart version | |
uses: mikefarah/yq@master | |
with: | |
cmd: | | |
BASEDIR=charts/csi-wekafsplugin | |
DRIVER_VERSION="$(echo ${{ steps.version.outputs.version }} | sed 's/^v//1')" | |
CHART_VERSION="${{ steps.helm_version.outputs.helm_version }}" | |
APP_VERSION="${{ steps.version.outputs.version }}" | |
yq -i '.version = "'$CHART_VERSION'"' $BASEDIR/Chart.yaml | |
yq -i '.appVersion = "'$APP_VERSION'"' $BASEDIR/Chart.yaml | |
yq -i '.sources[0] = "https://github.com/weka/csi-wekafs/tree/v$CHART_VERSION/charts/csi-wekafsplugin"' $BASEDIR/Chart.yaml | |
yq -i '.csiDriverVersion = "'$DRIVER_VERSION'"' $BASEDIR/values.yaml | |
echo ------------------ values ------------------ | |
cat $BASEDIR/values.yaml | |
echo --------------------chart ------------------ | |
cat $BASEDIR/Chart.yaml | |
- name: helm-docs | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: jnorwood/helm-docs:latest | |
options: -v ${{ github.workspace }}:/data | |
run: | | |
cd /data | |
helm-docs -s file -c charts -o ../../README.md -t ../README.md.gotmpl | |
helm-docs -s file -c charts | |
- name: Set up Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.10.0 | |
- name: update Helm schema | |
run: | | |
helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git | |
helm schema-gen charts/csi-wekafsplugin/values.yaml >| charts/csi-wekafsplugin/values.schema.json | |
# TEST CHART | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
check-latest: true | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }}) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --chart-dirs charts --all --debug --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
id: helm-test | |
run: | | |
ct install --print-config --chart-dirs charts --all --debug && \ | |
echo "passed=true" >> $GITHUB_OUTPUT | |
if: steps.list-changed.outputs.changed == 'true' | |
# UPLOAD CHART TO S3 | |
- name: Create Helm package | |
id: helm-package | |
run: | | |
helm package charts/csi-wekafsplugin | |
FILENAME="csi-wekafsplugin-${{ steps.helm_version.outputs.helm_version }}.tgz" | |
AWS_REGION=${{ secrets.AWS_ACCESS_SECRET_KEY }} | |
S3_BUCKET_NAME=${{ secrets.S3_BUCKET_NAME }} | |
URL="https://$S3_BUCKET_NAME.s3.$AWS_REGION.amazonaws.com" | |
echo "filename=$FILENAME" >> $GITHUB_OUTPUT | |
echo "url=$URL" >> $GITHUB_OUTPUT | |
- name: Install AWS CLI | |
id: install-aws-cli | |
uses: unfor19/install-aws-cli-action@v1 | |
with: | |
version: 2 | |
- name: Upload Helm package to S3 | |
id: helm-s3-upload | |
run: | | |
export AWS_ACCESS_KEY_ID="${{ secrets.AWS_ACCESS_KEY_ID }}" | |
export AWS_SECRET_ACCESS_KEY="${{ secrets.AWS_SECRET_ACCESS_KEY}}" | |
export AWS_REGION="${{ secrets.AWS_REGION }}" | |
aws s3 cp ${{ steps.helm-package.outputs.filename }} "s3://${{ vars.AWS_BUCKET }}/" | |
echo "link=https://${{ vars.AWS_BUCKET }}.s3.${AWS_REGION}.amazonaws.com/${{ steps.helm-package.outputs.filename }}" >> $GITHUB_OUTPUT | |
if: steps.helm-test.outputs.passed == 'true' | |
- uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: csiBot | |
SLACK_ICON_EMOJI: ":robot_face:" | |
SLACK_TITLE: "New build was pushed" | |
SLACK_MESSAGE: "```helm upgrade csi-wekafs -n csi-wekafs --create-namespace -i ${{ steps.helm-s3-upload.outputs.link }} --set logLevel=6```" | |
SLACK_FOOTER: "Package path: ${{ steps.helm-s3-upload.outputs.link }}" |