Intial GH Actions

This commit is contained in:
Tyler Auerbeck
2021-03-21 20:03:22 -04:00
parent c81266af66
commit d713dce7e0
3 changed files with 76 additions and 1 deletions

41
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: CI
on:
pull_request:
branches: [devel]
jobs:
pull_request:
runs-on: ubuntu-18.04
name: pull_request
env:
DOCKER_API_VERSION: "1.38"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Dependencies
run: |
pip install \
molecule \
molecule-docker \
yamllint \
ansible-lint \
openshift \
jmespath \
ansible
- name: Install Collections
run: |
ansible-galaxy collection install community.kubernetes operator_sdk.util
- name: Run Molecule
env:
MOLECULE_VERBOSITY: 3
run: |
molecule test -s test-local

34
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: Release
on:
push:
branches: [devel]
jobs:
release:
runs-on: ubuntu-18.04
name: release
steps:
- uses: actions/checkout@v2
- name: Install Operator-SDK
run: |
mkdir -p $GITHUB_WORKSPACE/bin
wget -O $GITHUB_WORKSPACE/bin/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v0.19.4/operator-sdk-v0.19.4-x86_64-linux-gnu
chmod +x $GITHUB_WORKSPACE/bin/operator-sdk
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Build Image
run: |
operator-sdk build awx-operator:devel
- name: Push To Quay
uses: redhat-actions/push-to-registry@v2.1.1
with:
image: awx-operator
tags: devel
registry: quay.io/ansible/
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

View File

@@ -8,5 +8,5 @@ ignore: |
rules:
truthy: disable
line-length:
max: 160
max: 170
level: warning