diff --git a/.github/actionlint.yml b/.github/actionlint.yml new file mode 100644 index 000000000..f98aab747 --- /dev/null +++ b/.github/actionlint.yml @@ -0,0 +1,3 @@ +self-hosted-runner: + # Labels of self-hosted runner in array of string + labels: ["cml"] diff --git a/.github/actions/python_cache/action.yml b/.github/actions/python_cache/action.yml index ea693888d..808403d86 100644 --- a/.github/actions/python_cache/action.yml +++ b/.github/actions/python_cache/action.yml @@ -6,9 +6,6 @@ inputs: description: 'prefix for the cache (to distinguish OS)' required: true default: 'linux' - pythonPath: - description: 'Python path to cache/restore' - required: true pythonVersion: description: 'Python version to use' required: true diff --git a/.github/workflows/minor_version_release.yml b/.github/workflows/minor_version_release.yml index c0e01f855..e776d87ff 100644 --- a/.github/workflows/minor_version_release.yml +++ b/.github/workflows/minor_version_release.yml @@ -7,7 +7,6 @@ jobs: sync: runs-on: ubuntu-latest steps: - - name: Checkout this repo uses: actions/checkout@v3 @@ -19,7 +18,7 @@ jobs: shell: bash # We only need `major.minor` in Readme so we cut the full version string to the first two tokens run: | - echo "::set-output name=current_release_minor::$(cat VERSION.txt | cut -d "." -f 1,2)" + echo "current_release_minor=$(cat VERSION.txt | cut -d "." -f 1,2)" >> $GITHUB_OUTPUT - name: Create new version branch run: | @@ -31,7 +30,7 @@ jobs: - name: Bump version on main shell: bash env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git checkout main cat VERSION.txt | awk -F. '/[0-9]+\./{$2++;print}' OFS=. | tee VERSION.txt diff --git a/.github/workflows/readme_sync.yml b/.github/workflows/readme_sync.yml index 728f07063..b015b5b00 100644 --- a/.github/workflows/readme_sync.yml +++ b/.github/workflows/readme_sync.yml @@ -6,21 +6,19 @@ on: branches: - main # release branches have the form v1.9.x - - 'v[0-9].*[0-9].x' - + - "v[0-9].*[0-9].x" jobs: sync: runs-on: ubuntu-latest steps: - - name: Checkout this repo uses: actions/checkout@v3 - name: Set up Python 3.8.10 uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" - name: Install dependencies run: | @@ -34,7 +32,7 @@ jobs: id: current-version shell: bash # We only need `major.minor` in Readme so we cut the full version string to the first two tokens - run: echo "::set-output name=minor::$(cat VERSION.txt | cut -d "." -f 1,2)" + run: echo "minor=$(cat VERSION.txt | cut -d "." -f 1,2)" >> $GITHUB_OUTPUT - name: Sync docs with unstable release # Instead of putting more logic into the previous step, let's just assume that commits on `main` diff --git a/.github/workflows/workflows_linting.yml b/.github/workflows/workflows_linting.yml new file mode 100644 index 000000000..38aab2a40 --- /dev/null +++ b/.github/workflows/workflows_linting.yml @@ -0,0 +1,19 @@ +name: Github workflows linter + +on: + pull_request: + paths: + - ".github/workflows" + +jobs: + lint-workflows: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install actionlint + run: go install github.com/rhysd/actionlint/cmd/actionlint@latest + + - name: Run actionlint + run: actionlint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bb5907e9..c4acf7f20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,5 +20,9 @@ repos: hooks: - id: black-jupyter +- repo: https://github.com/rhysd/actionlint + rev: v1.6.23 + hooks: + - id: actionlint # TODO we can make mypy and pylint run at this stage too, once their execution gets normalized