Skip to content

Commit

Permalink
chore: update workflow (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: David MICHENEAU <david.micheneau@orange.com>
  • Loading branch information
dmicheneau and David MICHENEAU authored Nov 4, 2024
1 parent 075ce74 commit 44fcc9f
Show file tree
Hide file tree
Showing 54 changed files with 472 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .changelog/43.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```release-note:enhancement
`command` - Add new option `--output` to improve result in `cav` command.
```

```release-note:enhancement
`command` - improve speed of printed result for vdc list command.
```
Expand Down
1 change: 0 additions & 1 deletion .ci
Submodule .ci deleted from 5a2159
2 changes: 1 addition & 1 deletion .github/changelog/generate-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ -z "$PREVIOUS_CHANGELOG" ]
then
echo "Unable to locate previous changelog contents."
exit 1
fi
fi

CHANGELOG=$($(go env GOPATH)/bin/changelog-build -this-release $TARGET_SHA \
-last-release $PREVIOUS_RELEASE_SHA \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_gen-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
paths:
- '**.go'

jobs:
generate:
name: gen-doc
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
workflow_dispatch:
schedule:
- cron: '33 22 * * 2'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on:
group: Default
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .github/workflows/dapendabot_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2.2.0
- uses: actions/checkout@v4
- uses: sersoft-gmbh/setup-gh-cli-action@v2
with:
version: stable
- run: |
gh pr checkout $PR_URL
cat << EOF > .changelog/$PR_NUMBER.txt
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: ci
on:
push:
branches:
Expand All @@ -15,19 +15,19 @@ jobs:
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
sudo apt install jq -y
# GITTAG=$(git describe --tags --abbrev=0) sed -i "s/__GITTAG__/$GITTAG/g" $GITHUB_WORKSPACE/docs/advanced/advanced-installation.md
# GITTAG=$(git describe --tags --abbrev=0) sed -i "s/__GITTAG__/$GITTAG/g" $GITHUB_WORKSPACE/docs/advanced/advanced-installation.md
GITTAG=$(curl -s https://api.github.com/repos/orange-cloudavenue/cloudavenue-cli/releases/latest | jq -r '.tag_name')
echo $GITTAG
sed -i "s/__GITTAG__/$GITTAG/g" $GITHUB_WORKSPACE/docs/advanced/advanced-installation.md
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material pymdown-extensions
- run: pip install mkdocs-material pymdown-extensions
- run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion .github/workflows/generate_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
token: ${{ secrets.CHANGELOG_PAT }}
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths:
- '**.go'
- '.golangci.yml'

# Testing only needs permissions to read the repository contents.
permissions:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

permissions:
contents: write
packages: write

jobs:
# * Step 0: Pre-Check
Expand Down Expand Up @@ -101,12 +102,12 @@ jobs:
tag: ${{ needs.pre-check.outputs.TAG_NAME }}
tag_exists_error: true
message: "Release ${{ needs.pre-check.outputs.TAG_NAME }}"

release-notes:
runs-on: ubuntu-latest
needs: [tag, pre-check]
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
fetch-depth: 0
ref: ${{ needs.pre-check.outputs.TAG_NAME }}
Expand Down Expand Up @@ -155,7 +156,7 @@ jobs:
needs: [release-app, golangci-lint, pre-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
token: ${{ secrets.CHANGELOG_PAT }}
fetch-depth: 0
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr_close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-changelog
cancel-in-progress: true

permissions:
contents: write
pull-requests: write

jobs:
GenerateChangelog:
if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
Expand All @@ -18,6 +22,7 @@ jobs:
token: ${{ secrets.CHANGELOG_PAT }}
fetch-depth: 0
submodules: false
ref: main
- uses: actions/setup-go@v5.1.0
with:
go-version-file: 'go.mod'
Expand All @@ -26,6 +31,7 @@ jobs:
- run: bash .github/changelog/generate-changelog.sh
- uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: "chore: Update CHANGELOG.md"
commit_options: '--no-verify --signoff'
push_options: '--force'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
fetch-depth: 0
- name: Generate Release Notes
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
needs: [release-notes]
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
Expand All @@ -61,7 +61,7 @@ jobs:
outputs:
tag: ${{ steps.highest-version-tag.outputs.tag }}
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
# Allow tag to be fetched when ref is a commit
fetch-depth: 0
Expand All @@ -79,7 +79,7 @@ jobs:
if: github.ref_name == needs.highest-version-tag.outputs.tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/checkout@v4 # v3.5.3
with:
token: ${{ secrets.CHANGELOG_PAT }}
fetch-depth: 0
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

Loading

0 comments on commit 44fcc9f

Please sign in to comment.