Skip to content

Commit

Permalink
initial changes for csm release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
shaynafinocchiaro committed Sep 3, 2024
1 parent be8becb commit a20257a
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/csm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform release activities on Golang based projects
name: Release

# Invocable as a reusable workflow
on:
workflow_call:

# Various jobs
jobs:
go-build:
name: Test repository builds

build-and-scan:
name: Build and Scan Images

security-scan:
name: Security Scans
runs-on: ubuntu-latest

release-branch:
name: Create Release Branch
runs-on: ubuntu-latest

release:
name: Create Release
-
17 changes: 17 additions & 0 deletions .github/workflows/go-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform go mod dependency updates on Golang based projects
name: Golang Module Dependencies

# Invocable as a reusable workflow
on:
workflow_call:

jobs:

2 changes: 1 addition & 1 deletion .github/workflows/go-static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform staic analysis on Golang based projects
# Reusable workflow to perform static analysis on Golang based projects
name: Golang Static Analysis

# Invocable as a reusable workflow
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/go-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Reusable workflow to perform go version update on Golang based projects
name: Go Version

# Invocable as a reusable workflow
# Manaully triggered workflow
on:
workflow_dispatch:
workflow_call:

jobs:
go-version:
name: Update go version
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
- name: Checkout the code
uses: actions/checkout@v4
- name: Check latest go Version
run: |
echo "GO_VERSION=$(curl -sL https://go.dev/VERSION?m=text) | awk 'NR==1{print $1}' | tr -cd '[:digit:].'" >> $GITHUB_ENV
- name: Update go version
run: |
go mod edit -go=${{ env.GO_VERSION }}
# Must allow GitHub Actions to create pull requests
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
branch: "go-${{ env.GO_VERSION }}"
commit-message: "Update go version to ${{ env.GO_VERSION }}"
title: "Update go version to ${{ env.GO_VERSION }}"
body: "PR opened by CSM release to update go version to ${{ env.GO_VERSION }}"
delete-branch: true

0 comments on commit a20257a

Please sign in to comment.