diff --git a/.github/workflows/ansible-tests-pr.yml b/.github/workflows/ansible-tests-pr.yml index 83fcad75..3b8565de 100644 --- a/.github/workflows/ansible-tests-pr.yml +++ b/.github/workflows/ansible-tests-pr.yml @@ -33,16 +33,16 @@ jobs: - name: install make run: sudo apt-get install -y build-essential - - name: setup python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: checkout Python SDK, this PR uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.ref }} + - name: setup python 3 + uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - name: checkout Ansible collection uses: actions/checkout@v4 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 14a7e89b..5037c663 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,27 +13,21 @@ jobs: runs-on: ubuntu-latest steps: - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 ssh-key: ${{ secrets.DEPLOY_KEY }} + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version-file: .python-version + - name: Install dependencies - working-directory: ${{ env.PACKAGE_DIR }} run: | python -m pip install --upgrade build - - name: Install pyaml for patching script - working-directory: ${{ env.PACKAGE_DIR }} - run: | - python -m pip install pyaml - - name: Create GitHub release uses: cycjimmy/semantic-release-action@v4 with: diff --git a/.github/workflows/sync-fabricv4.yaml b/.github/workflows/sync-fabricv4.yaml index f160d4ba..442eadd0 100644 --- a/.github/workflows/sync-fabricv4.yaml +++ b/.github/workflows/sync-fabricv4.yaml @@ -7,15 +7,15 @@ jobs: sync: runs-on: ubuntu-latest steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" - name: Checkout code uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: .python-version - name: GitHub user run: | # https://api.github.com/users/github-actions[bot] diff --git a/.github/workflows/sync-metalv1.yaml b/.github/workflows/sync-metalv1.yaml index 855b71d5..cb24426b 100644 --- a/.github/workflows/sync-metalv1.yaml +++ b/.github/workflows/sync-metalv1.yaml @@ -7,15 +7,15 @@ jobs: sync: runs-on: ubuntu-latest steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" - name: Checkout code uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: .python-version - name: GitHub user run: | # https://api.github.com/users/github-actions[bot] diff --git a/.github/workflows/test-codegen.yaml b/.github/workflows/test-codegen.yaml index 3008e4c3..e6d688d0 100644 --- a/.github/workflows/test-codegen.yaml +++ b/.github/workflows/test-codegen.yaml @@ -13,18 +13,21 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install Python uses: actions/setup-python@v5 with: - python-version: 3.8 - - name: Install pyaml for patching script - working-directory: ${{ env.PACKAGE_DIR }} + python-version-file: .python-version + + - name: Install pyaml for Metal patching script run: | python -m pip install pyaml - - name: Checkout code - uses: actions/checkout@v4 + - name: Verify Patches run: make patch-all + - name: Generate run: | make generate-all diff --git a/.gitignore b/.gitignore index 2f10163f..19e31eed 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ coverage.xml .hypothesis/ venv/ .venv/ -.python-version .pytest_cache # Translations diff --git a/.python-version b/.python-version new file mode 100644 index 00000000..c8cfe395 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.10 diff --git a/templates/.github/workflows/sync.yaml b/templates/.github/workflows/sync.yaml index 047ce26d..c3806c1e 100644 --- a/templates/.github/workflows/sync.yaml +++ b/templates/.github/workflows/sync.yaml @@ -7,15 +7,15 @@ jobs: sync: runs-on: ubuntu-latest steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.8 - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" - name: Checkout code uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: .python-version - name: GitHub user run: | # https://api.github.com/users/github-actions[bot]