diff --git a/.github/workflows/push-workflow.yml b/.github/workflows/push-workflow.yml new file mode 100644 index 0000000..1b5d7cd --- /dev/null +++ b/.github/workflows/push-workflow.yml @@ -0,0 +1,21 @@ +name: Push Workflow + +on: [push] + +jobs: + pylint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r requirements.txt + python3 -m pip install -r src/providers/openstack/requirements.txt + - name: Analysing the code with Pylint + run: | + pylint . diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml new file mode 100644 index 0000000..1e103ee --- /dev/null +++ b/.github/workflows/release-workflow.yml @@ -0,0 +1,36 @@ +name: Release Workflow + +on: [release] + +jobs: + docker: + runs-on: ubuntu-latest + strategy: + matrix: + provider: ["openstack"] + steps: + - name: Set versions to push on DockerHub + run: | + echo "VERSION_FULL=$(echo ${{ github.event.release.tag_name }})" >> $GITHUB_ENV + echo "VERSION_MEDIUM=$(echo ${{ github.event.release.tag_name }} | cut -d '.' -f -2)" >> $GITHUB_ENV + echo "VERSION_SHORT=$(echo ${{ github.event.release.tag_name }} | cut -d '.' -f -1)" >> $GITHUB_ENV + echo "VERSION_LATEST=$(echo latest)" >> $GITHUB_ENV + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: renater + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + build-args: PROVIDER=${{ matrix.provider }} + tags: >- + renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_FULL }}, + renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_MEDIUM }}, + renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_SHORT }}, + renater/simplescalevm:${{ matrix.provider }}-${{ env.VERSION_LATEST }} diff --git a/.pylintrc b/.pylintrc index 456fee9..646a548 100644 --- a/.pylintrc +++ b/.pylintrc @@ -540,7 +540,7 @@ preferred-modules= # List of regular expressions of class ancestor names to ignore when counting # public methods (see R0903) -exclude-too-few-public-methods= +exclude-too-few-public-methods=.* # List of qualified class names to ignore when counting class parents (see # R0901)