From 7ff3e3c6830e03f0ef589b40214132dcf7fc3ae4 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Thu, 20 Jul 2023 15:52:51 +0200 Subject: [PATCH] ci: upgrade pipeline to new standard structure --- .github/workflows/README.md | 1 + .github/workflows/galaxy.yml | 3 ++- .github/workflows/general.yml | 18 +++++++++++++----- .github/workflows/lock.yml | 23 ----------------------- .github/workflows/react.yml | 31 ------------------------------- .github/workflows/readme.yml | 3 ++- .github/workflows/release.yml | 9 +++++---- molecule/default/molecule.yml | 8 ++++---- 8 files changed, 27 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/README.md delete mode 100644 .github/workflows/lock.yml delete mode 100644 .github/workflows/react.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000..6a6bf99 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1 @@ +# workflows diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 2d078b0..123ea8d 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -2,16 +2,17 @@ name: galaxy "on": + workflow_dispatch: push: branches: - master tags: - v* - workflow_dispatch: jobs: galaxy: runs-on: ubuntu-latest + if: github.repository_owner == 'rolehippie' steps: - name: Checkout source diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml index 5d81811..8096269 100644 --- a/.github/workflows/general.yml +++ b/.github/workflows/general.yml @@ -2,17 +2,18 @@ name: general "on": + workflow_dispatch: push: branches: - master pull_request: branches: - master - workflow_dispatch: jobs: linting: runs-on: ubuntu-latest + if: github.repository_owner == 'rolehippie' steps: - name: Checkout source @@ -23,6 +24,7 @@ jobs: testing: runs-on: ubuntu-latest + if: github.repository_owner == 'rolehippie' strategy: fail-fast: false @@ -35,12 +37,18 @@ jobs: - name: Checkout source uses: actions/checkout@v3 - - name: Molecule tests - uses: gofrolist/molecule-action@v2 + - name: Setup Python + uses: actions/setup-python@v4 with: - molecule_command: test - molecule_args: --scenario-name ${{ matrix.scenario }} + python-version: 3.x + + - name: Install dependencies + run: pip3 install docker pytest-testinfra ansible molecule molecule-plugins[docker] + + - name: Molecule tests + run: molecule test --scenario-name ${{ matrix.scenario }} env: + PY_COLORS: "1" ANSIBLE_FORCE_COLOR: "1" ... diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index b2ed63d..0000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: lock - -"on": - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - -concurrency: - group: lock - -jobs: - execute: - runs-on: ubuntu-latest - - steps: - - uses: dessant/lock-threads@v4 - -... diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml deleted file mode 100644 index 0dd7173..0000000 --- a/.github/workflows/react.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: react - -"on": - issue_comment: - types: - - created - - edited - pull_request_review_comment: - types: - - created - - edited - schedule: - - cron: "0 0 * * *" - -permissions: - actions: write - issues: write - pull-requests: write - -concurrency: - group: react - -jobs: - execute: - runs-on: ubuntu-latest - - steps: - - uses: dessant/reaction-comments@v3 - -... diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index 57f2b2c..037538f 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -2,14 +2,15 @@ name: readme "on": + workflow_dispatch: push: branches: - master - workflow_dispatch: jobs: readme: runs-on: ubuntu-latest + if: github.repository_owner == 'rolehippie' steps: - name: Checkout source diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3df74d..169ab58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,13 +2,14 @@ name: release "on": + workflow_dispatch: schedule: - cron: "0 8 * * 1" - workflow_dispatch: jobs: release: runs-on: ubuntu-latest + if: github.repository_owner == 'rolehippie' steps: - name: Checkout source @@ -16,9 +17,6 @@ jobs: with: token: ${{ secrets.BOT_ACCESS_TOKEN }} - - name: Write buildtime - run: date >| .github/RELEASEDATE - - name: Semantic release uses: cycjimmy/semantic-release-action@v3 env: @@ -27,6 +25,9 @@ jobs: extra_plugins: | conventional-changelog-conventionalcommits + - name: Write buildtime + run: date >| .github/RELEASEDATE + - name: Commit changes uses: EndBug/add-and-commit@v9 with: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 95b911a..6764d03 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -3,7 +3,7 @@ dependency: name: galaxy options: - role-file: molecule/requirements.yml + requirements-file: molecule/requirements.yml env: ANSIBLE_GALAXY_DISPLAY_PROGRESS: "false" @@ -23,7 +23,7 @@ platforms: - /run - /run/lock volumes: - - /sys/fs/cgroup:/sys/fs/cgroup + - /sys/fs/cgroup:/sys/fs/cgroup:rw environment: container: docker - name: rclone-ubuntu-20 @@ -38,7 +38,7 @@ platforms: - /run - /run/lock volumes: - - /sys/fs/cgroup:/sys/fs/cgroup + - /sys/fs/cgroup:/sys/fs/cgroup:rw environment: container: docker - name: rclone-ubuntu-18 @@ -53,7 +53,7 @@ platforms: - /run - /run/lock volumes: - - /sys/fs/cgroup:/sys/fs/cgroup + - /sys/fs/cgroup:/sys/fs/cgroup:rw environment: container: docker