Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ major=$(echo $new_sdk_version | cut -d '.' -f 1)
branch_name="autobuild-$new_sdk_version"

# https://docs.github.com/en/free-pro-team@latest/rest/reference/pulls#create-a-pull-request
result=$(curl -s -X POST -H "Authorization: token $GH_TOKEN" -d "{\"head\":\"$branch_name\",\"base\":\"master\",\"title\":\"SDK v$new_sdk_version\",\"body\":\"Automatic build of SDK v$new_sdk_version version based on Outscale API $osc_api_version\"}" "https://api.github.com/repos/outscale/osc-sdk-python/pulls")
result=$(curl -s -X POST -H "Authorization: token $GH_TOKEN" -d "{\"head\":\"$branch_name\",\"base\":\"main\",\"title\":\"SDK v$new_sdk_version\",\"body\":\"Automatic build of SDK v$new_sdk_version version based on Outscale API $osc_api_version\"}" "https://api.github.com/repos/outscale/osc-sdk-python/pulls")

errors=$(echo $result | jq .errors)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
jobs:
auto-build:
environment: auto-build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: ⬇️ Install Python
uses: actions/setup-python@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-check-identified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Code check On outscale
on:
pull_request:
branches:
- master
- main

permissions:
pull-requests: write
Expand All @@ -20,7 +20,7 @@ jobs:
secret_key: ${{ secrets.OSC_SECRET_KEY }}
region: ${{ secrets.OSC_REGION }}
- name: ⬇️ Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: ⬇️ Import Outscale API description
run: make init
- name: ⬇️ Install Python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
on:
pull_request:
branches:
- master
- main

jobs:
code-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Import Outscale API description
run: make init
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: make .venv/ok
- name: Analysing the code with pylint
run: make test-pylint
- name: Security check - Bandit
run: make test-bandit
- name: Build python package
run: make package
- name: Run integration tests
run: ./local-tests.sh

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
12 changes: 7 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ "main" ]
pull_request:
branches: [ "master" ]
branches: [ "main" ]
schedule:
- cron: "33 13 * * 5"
- cron: "37 13 * * 5"

jobs:
analyze:
Expand All @@ -20,11 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ python ]
include:
- language: python
- language: actions

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/cred-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

on:
pull_request:
branches: [ master ]
branches: [ main ]

permissions:
contents: read

jobs:
cred-scan:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Scan credentials
uses: outscale-dev/cred-scan@main
uses: outscale/cred-scan@main
with:
scan_path: "./"
9 changes: 6 additions & 3 deletions .github/workflows/github-sanity-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Github sanity scanner

on:
pull_request:
branches: [ master ]
branches: [ main ]

permissions:
contents: read

jobs:
github-sanity-scan:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Github sanity scanner
uses: outscale/github-sanity-scan@main
with:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: osc-sdk-python pip publishing

on:
release:
types: [released]

permissions:
contents: read
id-token: write

jobs:
publish:
build:
runs-on: ubuntu-24.04
environment: publish
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Initialize submodules
run: make init
- name: Build & Push packages
run: make upload-package
env:
PIP_TOKEN: ${{ secrets.PIP_TOKEN }}
- name: Build packages
run: make package
- uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ test-int: .venv/ok init
package: .venv/ok init
@./scripts/package.sh

.PHONY: upload-package
upload-package: package
@./scripts/upload_package.sh

.PHONY: osc-api-update
osc-api-update:
cd osc_sdk_python/osc-api/; git fetch; git checkout origin/master; cd ..; git add osc-api
Expand Down
20 changes: 0 additions & 20 deletions scripts/upload_package.sh

This file was deleted.

Loading