diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 186c3cd8..1279b339 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -12,11 +12,13 @@ jobs: python-version: [3.12] steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false # do not keep the token around - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index ca12e50b..43a56024 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -24,9 +24,13 @@ jobs: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false # do not keep the token around + + - name: Set up Python 3.12 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: 3.12 diff --git a/src/commoncode/system.py b/src/commoncode/system.py index 3c5a6744..605e09ae 100644 --- a/src/commoncode/system.py +++ b/src/commoncode/system.py @@ -30,6 +30,10 @@ def os_arch(): os = "mac" elif "freebsd" in sys_platform: os = "freebsd" + elif "sunos" in sys_platform: + os = "sunos" + elif "haiku" in sys_platform: + os = "haiku" else: raise Exception("Unsupported OS/platform %r" % sys_platform) return os, arch @@ -45,7 +49,9 @@ def os_arch(): on_mac = current_os == "mac" on_linux = current_os == "linux" on_freebsd = current_os == "freebsd" -on_posix = not on_windows and (on_mac or on_linux or on_freebsd) +on_sunos = current_os == "sunos" +on_haiku = current_os == "haiku" +on_posix = not on_windows and (on_mac or on_linux or on_freebsd or on_sunos or on_haiku) current_os_arch = "%(current_os)s-%(current_arch)s" % locals() noarch = "noarch"