From d713dce7e0882ae2e7d8244936c67511cf150b44 Mon Sep 17 00:00:00 2001 From: Tyler Auerbeck Date: Sun, 21 Mar 2021 20:03:22 -0400 Subject: [PATCH] Intial GH Actions --- .github/workflows/ci.yaml | 41 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++ .yamllint | 2 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..eb24c5dd --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..8edeefa8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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 }} diff --git a/.yamllint b/.yamllint index 1f8b73d0..01becb8a 100644 --- a/.yamllint +++ b/.yamllint @@ -8,5 +8,5 @@ ignore: | rules: truthy: disable line-length: - max: 160 + max: 170 level: warning