-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Renater/add-simple-ci
Add basic CI
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
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