dellboss: fixup get_dellboss_diskprop and get_boss_devices #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
pull_request: | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- run: pip install black | |
- run: black --check --diff . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- run: pip install pylama | |
- run: pylama packethardware setup.py | |
cli-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "${{matrix.python-version}}" | |
- name: Basic cli test on Python ${{matrix.python-version}} | |
run: | | |
pip install . | |
packet-hardware --help | |
build-and-publish-docker-image: | |
name: build image and possibly push image to quay.io | |
runs-on: ubuntu-latest | |
needs: | |
- cli-test | |
- format | |
- lint | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: 'true' | |
- uses: docker/setup-buildx-action@v2 | |
id: buildx | |
- uses: docker/metadata-action@v4 | |
id: meta | |
with: | |
images: quay.io/packet/packet-hardware | |
tags: | | |
type=ref,event=tag | |
type=sha | |
type=ref,event=branch | |
- uses: docker/login-action@v2 | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' | |
with: | |
registry: quay.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-cache | |
restore-keys: | | |
${{ runner.os }}-cache | |
- uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64 | |
push: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
context: '.' | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
builder: ${{ steps.buildx.outputs.name }} |