summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/sops/.github
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/sops/.github')
-rw-r--r--ansible_collections/community/sops/.github/dependabot.yml11
-rw-r--r--ansible_collections/community/sops/.github/pull_request_template.md8
-rw-r--r--ansible_collections/community/sops/.github/pull_request_template.md.license3
-rw-r--r--ansible_collections/community/sops/.github/workflows/ansible-test.yml240
-rw-r--r--ansible_collections/community/sops/.github/workflows/docs-pr.yml92
-rw-r--r--ansible_collections/community/sops/.github/workflows/docs-push.yml52
-rw-r--r--ansible_collections/community/sops/.github/workflows/ee.yml120
-rw-r--r--ansible_collections/community/sops/.github/workflows/extra-tests.yml48
-rw-r--r--ansible_collections/community/sops/.github/workflows/import-galaxy.yml88
-rw-r--r--ansible_collections/community/sops/.github/workflows/reuse.yml32
10 files changed, 694 insertions, 0 deletions
diff --git a/ansible_collections/community/sops/.github/dependabot.yml b/ansible_collections/community/sops/.github/dependabot.yml
new file mode 100644
index 00000000..2f4ff900
--- /dev/null
+++ b/ansible_collections/community/sops/.github/dependabot.yml
@@ -0,0 +1,11 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/ansible_collections/community/sops/.github/pull_request_template.md b/ansible_collections/community/sops/.github/pull_request_template.md
new file mode 100644
index 00000000..917af7ed
--- /dev/null
+++ b/ansible_collections/community/sops/.github/pull_request_template.md
@@ -0,0 +1,8 @@
+### Motivation
+<!-- describe why this changes are necessary/useful -->
+
+### Changes description
+<!-- describe what changes are in this PR. Overview is OK, details shall be found in the git commits -->
+
+### Additional notes
+<!-- any note related to these changes, please add them here -->
diff --git a/ansible_collections/community/sops/.github/pull_request_template.md.license b/ansible_collections/community/sops/.github/pull_request_template.md.license
new file mode 100644
index 00000000..edff8c76
--- /dev/null
+++ b/ansible_collections/community/sops/.github/pull_request_template.md.license
@@ -0,0 +1,3 @@
+GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+SPDX-License-Identifier: GPL-3.0-or-later
+SPDX-FileCopyrightText: Ansible Project
diff --git a/ansible_collections/community/sops/.github/workflows/ansible-test.yml b/ansible_collections/community/sops/.github/workflows/ansible-test.yml
new file mode 100644
index 00000000..187e5d77
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/ansible-test.yml
@@ -0,0 +1,240 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# For the comprehensive list of the inputs supported by the ansible-community/ansible-test-gh-action GitHub Action, see
+# https://github.com/marketplace/actions/ansible-test
+
+name: CI
+on:
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
+ push:
+ branches:
+ - main
+ - stable-*
+ pull_request:
+ # Run CI once per day (at 05:30 UTC)
+ schedule:
+ - cron: '30 5 * * *'
+
+jobs:
+ sanity:
+ name: Sanity (Ⓐ${{ matrix.ansible }})
+ strategy:
+ matrix:
+ ansible:
+ # It's important that Sanity is tested against all stable-X.Y branches
+ # Testing against `devel` may fail as new tests are added.
+ - stable-2.9
+ - stable-2.10
+ - stable-2.11
+ - stable-2.12
+ - stable-2.13
+ - stable-2.14
+ - devel
+ # Ansible-test on various stable branches does not yet work well with cgroups v2.
+ # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
+ # image for these stable branches. The list of branches where this is necessary will
+ # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
+ # for the latest list.
+ runs-on: >-
+ ${{ contains(fromJson(
+ '["stable-2.9", "stable-2.10", "stable-2.11"]'
+ ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
+ steps:
+ - name: Perform sanity testing
+ uses: felixfontein/ansible-test-gh-action@main
+ with:
+ ansible-core-version: ${{ matrix.ansible }}
+ testing-type: sanity
+
+ integration:
+ # Ansible-test on various stable branches does not yet work well with cgroups v2.
+ # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
+ # image for these stable branches. The list of branches where this is necessary will
+ # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
+ # for the latest list.
+ runs-on: >-
+ ${{ contains(fromJson(
+ '["stable-2.9", "stable-2.10", "stable-2.11"]'
+ ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
+ permissions:
+ contents: read
+ strategy:
+ matrix:
+ ansible:
+ - devel
+ docker_container:
+ - ubuntu2004
+ - ubuntu2204
+ - fedora37
+ sops_version:
+ - 3.5.0
+ - 3.6.0
+ - 3.7.3
+ python_version:
+ - ''
+ include:
+ # 2.9
+ - ansible: stable-2.9
+ docker_container: ubuntu1604
+ sops_version: 3.5.0
+ - ansible: stable-2.9
+ docker_container: ubuntu1804
+ sops_version: 3.7.1
+ # 2.10
+ - ansible: stable-2.10
+ docker_container: ubuntu1804
+ sops_version: 3.6.0
+ # 2.11
+ - ansible: stable-2.11
+ docker_container: ubuntu2004
+ sops_version: 3.7.2
+ # 2.12
+ - ansible: stable-2.12
+ docker_container: ubuntu2004
+ sops_version: 3.7.0
+ # 2.13
+ - ansible: stable-2.13
+ docker_container: ubuntu2004
+ sops_version: 3.7.3
+ # 2.14
+ - ansible: stable-2.14
+ docker_container: ubuntu2204
+ sops_version: 3.7.3
+ # devel
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:archlinux
+ python_version: '3.10'
+ sops_version: latest
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:debian-bullseye
+ python_version: '3.9'
+ sops_version: latest
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:centos-stream8
+ python_version: '3.8'
+ sops_version: latest
+ steps:
+ - name: >-
+ Perform integration testing against
+ Ansible version ${{ matrix.ansible }}
+ under ${{ matrix.docker_container }}
+ with sops ${{ matrix.sops_version }}
+ uses: felixfontein/ansible-test-gh-action@main
+ with:
+ ansible-core-version: ${{ matrix.ansible }}
+ docker-image: ${{ matrix.docker_container }}
+ integration-continue-on-error: 'false'
+ integration-diff: 'false'
+ integration-retry-on-error: 'true'
+ # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
+ pre-test-cmd: |-
+ echo 'override_sops_version: ${{ matrix.sops_version }}' > tests/integration/integration_config.yml
+ echo 'github_token: ${{ secrets.GITHUB_TOKEN }}' >> tests/integration/integration_config.yml
+ git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git ../../community/general
+ testing-type: integration
+ target-python-version: ${{ matrix.python_version }}
+ target: gha/main/
+
+ integration-install:
+ # Ansible-test on various stable branches does not yet work well with cgroups v2.
+ # Since ubuntu-latest now uses Ubuntu 22.04, we need to fall back to the ubuntu-20.04
+ # image for these stable branches. The list of branches where this is necessary will
+ # shrink over time, check out https://github.com/ansible-collections/news-for-maintainers/issues/28
+ # for the latest list.
+ runs-on: >-
+ ${{ contains(fromJson(
+ '["stable-2.9", "stable-2.10", "stable-2.11"]'
+ ), matrix.ansible) && 'ubuntu-20.04' || 'ubuntu-latest' }}
+ permissions:
+ contents: read
+ strategy:
+ matrix:
+ ansible:
+ - devel
+ docker_container:
+ - ''
+ python_version:
+ - ''
+ target:
+ - gha/install/
+ pre-test-cmd:
+ - ''
+ github_latest_detection:
+ - ''
+ exclude:
+ - docker_container: ''
+ include:
+ # Install specific sops
+ - ansible: devel
+ docker_container: ubuntu2204
+ python_version: ''
+ target: gha/install/1/
+ # Install on localhost vs. remote host
+ - ansible: devel
+ docker_container: ubuntu2004
+ python_version: ''
+ target: gha/install/2/
+ # Install latest sops
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:archlinux
+ python_version: '3.10'
+ target: gha/install/3/
+ github_latest_detection: auto
+ # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
+ pre-test-cmd: |-
+ git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git ../../community/general
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:centos-stream8
+ python_version: '3.8'
+ target: gha/install/3/
+ github_latest_detection: auto
+ - ansible: devel
+ docker_container: quay.io/ansible-community/test-image:debian-bullseye
+ python_version: '3.9'
+ target: gha/install/3/
+ github_latest_detection: auto
+ - ansible: devel
+ docker_container: fedora37
+ python_version: ''
+ target: gha/install/3/
+ github_latest_detection: auto
+ - ansible: devel
+ docker_container: ubuntu2004
+ python_version: ''
+ target: gha/install/3/
+ github_latest_detection: api
+ - ansible: devel
+ docker_container: ubuntu2204
+ python_version: ''
+ target: gha/install/3/
+ github_latest_detection: latest-release
+ # - ansible: devel
+ # docker_container: alpine3 -- so far only alpine3 edge supports sops
+ # python_version: ''
+ # target: gha/install/3/
+ # github_latest_detection: auto
+ # # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
+ # pre-test-cmd: |-
+ # git clone --depth=1 --single-branch https://github.com/ansible-collections/community.general.git ../../community/general
+ steps:
+ - name: >-
+ Perform sops installation integration testing against
+ Ansible version ${{ matrix.ansible }}
+ under ${{ matrix.docker_container }}
+ uses: felixfontein/ansible-test-gh-action@main
+ with:
+ ansible-core-version: ${{ matrix.ansible }}
+ docker-image: ${{ matrix.docker_container }}
+ integration-continue-on-error: 'false'
+ integration-diff: 'false'
+ integration-retry-on-error: 'true'
+ pre-test-cmd: |-
+ echo 'github_token: ${{ secrets.GITHUB_TOKEN }}' > tests/integration/integration_config.yml
+ echo 'github_latest_detection: ${{ matrix.github_latest_detection || 'auto' }}' >> tests/integration/integration_config.yml
+ ${{ matrix.pre-test-cmd || 'echo' }}
+ testing-type: integration
+ target-python-version: ${{ matrix.python_version }}
+ target: ${{ matrix.target }}
diff --git a/ansible_collections/community/sops/.github/workflows/docs-pr.yml b/ansible_collections/community/sops/.github/workflows/docs-pr.yml
new file mode 100644
index 00000000..44667b5b
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/docs-pr.yml
@@ -0,0 +1,92 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: Collection Docs
+concurrency:
+ group: docs-pr-${{ github.head_ref }}
+ cancel-in-progress: true
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened, closed]
+
+env:
+ GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
+
+jobs:
+ build-docs:
+ permissions:
+ contents: read
+ name: Build Ansible Docs
+ uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main
+ with:
+ collection-name: community.sops
+ init-lenient: false
+ init-fail-on-error: true
+ squash-hierarchy: true
+ init-project: Community.Sops Collection
+ init-copyright: Community.Sops Contributors
+ init-title: Community.Sops Collection Documentation
+ init-html-short-title: Community.Sops Collection Docs
+ init-extra-html-theme-options: |
+ documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
+ render-file-line: '> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)'
+
+ publish-docs-gh-pages:
+ # for now we won't run this on forks
+ if: github.repository == 'ansible-collections/community.sops'
+ permissions:
+ contents: write
+ needs: [build-docs]
+ name: Publish Ansible Docs
+ uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
+ with:
+ artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
+ action: ${{ (github.event.action == 'closed' || needs.build-docs.outputs.changed != 'true') && 'teardown' || 'publish' }}
+ secrets:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ comment:
+ permissions:
+ pull-requests: write
+ runs-on: ubuntu-latest
+ needs: [build-docs, publish-docs-gh-pages]
+ name: PR comments
+ steps:
+ - name: PR comment
+ uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main
+ with:
+ body-includes: '## Docs Build'
+ reactions: heart
+ action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }}
+ on-closed-body: |
+ ## Docs Build 📝
+
+ This PR is closed and any previously published docsite has been unpublished.
+ on-merged-body: |
+ ## Docs Build 📝
+
+ Thank you for contribution!✨
+
+ This PR has been merged and the docs are now incorporated into `main`:
+ ${{ env.GHP_BASE_URL }}/branch/main
+ body: |
+ ## Docs Build 📝
+
+ Thank you for contribution!✨
+
+ The docs for **this PR** have been published here:
+ ${{ env.GHP_BASE_URL }}/pr/${{ github.event.number }}
+
+ You can compare to the docs for the `main` branch here:
+ ${{ env.GHP_BASE_URL }}/branch/main
+
+ The docsite for **this PR** is also available for download as an artifact from this run:
+ ${{ needs.build-docs.outputs.artifact-url }}
+
+ File changes:
+
+ ${{ needs.build-docs.outputs.diff-files-rendered }}
+
+ ${{ needs.build-docs.outputs.diff-rendered }}
diff --git a/ansible_collections/community/sops/.github/workflows/docs-push.yml b/ansible_collections/community/sops/.github/workflows/docs-push.yml
new file mode 100644
index 00000000..6b803710
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/docs-push.yml
@@ -0,0 +1,52 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: Collection Docs
+concurrency:
+ group: docs-push-${{ github.sha }}
+ cancel-in-progress: true
+on:
+ push:
+ branches:
+ - main
+ - stable-*
+ tags:
+ - '*'
+ # Run CI once per day (at 05:30 UTC)
+ schedule:
+ - cron: '30 5 * * *'
+ # Allow manual trigger (for newer antsibull-docs, sphinx-ansible-theme, ... versions)
+ workflow_dispatch:
+
+jobs:
+ build-docs:
+ permissions:
+ contents: read
+ name: Build Ansible Docs
+ uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-push.yml@main
+ with:
+ collection-name: community.sops
+ init-lenient: false
+ init-fail-on-error: true
+ squash-hierarchy: true
+ init-project: Community.Sops Collection
+ init-copyright: Community.Sops Contributors
+ init-title: Community.Sops Collection Documentation
+ init-html-short-title: Community.Sops Collection Docs
+ init-extra-html-theme-options: |
+ documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
+
+ publish-docs-gh-pages:
+ # for now we won't run this on forks
+ if: github.repository == 'ansible-collections/community.sops'
+ permissions:
+ contents: write
+ needs: [build-docs]
+ name: Publish Ansible Docs
+ uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
+ with:
+ artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
+ secrets:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/ansible_collections/community/sops/.github/workflows/ee.yml b/ansible_collections/community/sops/.github/workflows/ee.yml
new file mode 100644
index 00000000..a3d730e7
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/ee.yml
@@ -0,0 +1,120 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: execution environment
+on:
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
+ push:
+ branches:
+ - main
+ - stable-*
+ pull_request:
+ # Run CI once per day (at 05:30 UTC)
+ # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-builder
+ schedule:
+ - cron: '30 5 * * *'
+
+env:
+ NAMESPACE: community
+ COLLECTION_NAME: sops
+
+jobs:
+ build:
+ name: Build and test EE (Ⓐ${{ matrix.runner_tag }})
+ strategy:
+ matrix:
+ runner_tag:
+ - devel
+ - stable-2.12-latest
+ - stable-2.11-latest
+ execute_playbook:
+ - ansible-playbook -v community.sops.install_localhost
+ include:
+ - runner_tag: stable-2.9-latest
+ execute_playbook: ansible localhost -m include_role -a name=community.sops.install -e sops_install_on_localhost=true -e ansible_python_interpreter=/usr/libexec/platform-python
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ with:
+ path: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+
+ - name: Install ansible-builder and ansible-navigator
+ run: pip install ansible-builder ansible-navigator
+
+ - name: Verify requirements
+ run: ansible-builder introspect --sanitize .
+
+ - name: Make sure galaxy.yml has version entry
+ run: >-
+ python -c
+ 'import yaml ;
+ f = open("galaxy.yml", "rb") ;
+ data = yaml.safe_load(f) ;
+ f.close() ;
+ data["version"] = data.get("version") or "0.0.1" ;
+ f = open("galaxy.yml", "wb") ;
+ f.write(yaml.dump(data).encode("utf-8")) ;
+ f.close() ;
+ '
+ working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
+
+ - name: Build collection
+ run: |
+ ansible-galaxy collection build --output-path ../../../
+ working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
+
+ - name: Create files for building execution environment
+ run: |
+ COLLECTION_FILENAME="$(ls "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz)"
+
+ # EE config
+ cat > execution-environment.yml <<EOF
+ ---
+ version: 1
+ build_arg_defaults:
+ EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:${{ matrix.runner_tag }}'
+ dependencies:
+ galaxy: requirements.yml
+ additional_build_steps:
+ append:
+ - RUN ${{ matrix.execute_playbook }}
+ EOF
+ echo "::group::execution-environment.yml"
+ cat execution-environment.yml
+ echo "::endgroup::"
+
+ # Requirements
+ cat > requirements.yml <<EOF
+ ---
+ collections:
+ - name: ${COLLECTION_FILENAME}
+ type: file
+ EOF
+ echo "::group::requirements.yml"
+ cat requirements.yml
+ echo "::endgroup::"
+
+ - name: Build image based on ${{ matrix.runner_tag }}
+ run: |
+ mkdir -p context/_build/
+ cp "${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}"-*.tar.gz context/_build/
+ ansible-builder build -v 3 -t test-ee:latest --container-runtime=podman
+
+ - name: Run basic tests
+ run: >
+ ansible-navigator run
+ --mode stdout
+ --pull-policy never
+ --set-environment-variable ANSIBLE_PRIVATE_ROLE_VARS=true
+ --execution-environment-image test-ee:latest
+ -v
+ all.yml
+ working-directory: ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}/tests/ee
diff --git a/ansible_collections/community/sops/.github/workflows/extra-tests.yml b/ansible_collections/community/sops/.github/workflows/extra-tests.yml
new file mode 100644
index 00000000..fd2f7f55
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/extra-tests.yml
@@ -0,0 +1,48 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: extra-tests
+on:
+ # Run CI against all pushes (direct commits, also merged PRs), Pull Requests
+ push:
+ branches:
+ - main
+ - stable-*
+ pull_request:
+ # Run CI once per day (at 05:30 UTC)
+ # This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version
+ schedule:
+ - cron: '30 5 * * *'
+env:
+ NAMESPACE: community
+ COLLECTION_NAME: sops
+
+jobs:
+ extra-sanity:
+ name: Extra Sanity
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Check out code
+ uses: actions/checkout@v3
+ with:
+ path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+
+ - name: Install ansible-core
+ run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
+
+ - name: Install collection dependencies
+ run: git clone --depth=1 --single-branch https://github.com/ansible-collections/community.internal_test_tools.git ./ansible_collections/community/internal_test_tools
+ # NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
+ # run: ansible-galaxy collection install community.internal_test_tools -p .
+
+ - name: Run sanity tests
+ run: ../../community/internal_test_tools/tools/run.py --color
+ working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
diff --git a/ansible_collections/community/sops/.github/workflows/import-galaxy.yml b/ansible_collections/community/sops/.github/workflows/import-galaxy.yml
new file mode 100644
index 00000000..ae472845
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/import-galaxy.yml
@@ -0,0 +1,88 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: import-galaxy
+on:
+ # Run CI against all pushes (direct commits, also merged PRs) to main, and all Pull Requests
+ push:
+ branches:
+ - main
+ - stable-*
+ pull_request:
+
+env:
+ # Adjust this to your collection
+ NAMESPACE: community
+ COLLECTION_NAME: sops
+
+jobs:
+ build-collection:
+ name: Build collection artifact
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ with:
+ path: ./checkout
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+
+ - name: Install ansible-core
+ run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
+
+ - name: Make sure galaxy.yml has version entry
+ run: >-
+ python -c
+ 'import yaml ;
+ f = open("galaxy.yml", "rb") ;
+ data = yaml.safe_load(f) ;
+ f.close() ;
+ data["version"] = data.get("version") or "0.0.1" ;
+ f = open("galaxy.yml", "wb") ;
+ f.write(yaml.dump(data).encode("utf-8")) ;
+ f.close() ;
+ '
+ working-directory: ./checkout
+
+ - name: Build collection
+ run: ansible-galaxy collection build
+ working-directory: ./checkout
+
+ - name: Copy artifact into subdirectory
+ run: mkdir ./artifact && mv ./checkout/${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz ./artifact
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }}
+ path: ./artifact/
+
+ import-galaxy:
+ name: Import artifact with Galaxy importer
+ runs-on: ubuntu-latest
+ needs:
+ - build-collection
+ steps:
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+
+ - name: Install ansible-core
+ run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
+
+ - name: Install galaxy-importer
+ run: pip install galaxy-importer --disable-pip-version-check
+
+ - name: Download artifact
+ uses: actions/download-artifact@v3
+ with:
+ name: ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-${{ github.sha }}
+
+ - name: Run Galaxy importer
+ run: python -m galaxy_importer.main ${{ env.NAMESPACE }}-${{ env.COLLECTION_NAME }}-*.tar.gz
diff --git a/ansible_collections/community/sops/.github/workflows/reuse.yml b/ansible_collections/community/sops/.github/workflows/reuse.yml
new file mode 100644
index 00000000..f487d796
--- /dev/null
+++ b/ansible_collections/community/sops/.github/workflows/reuse.yml
@@ -0,0 +1,32 @@
+---
+# Copyright (c) Ansible Project
+# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+name: Verify REUSE
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+ # Run CI once per day (at 05:30 UTC)
+ schedule:
+ - cron: '30 5 * * *'
+
+jobs:
+ check:
+ permissions:
+ contents: read
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: |
+ pip install reuse
+
+ - name: Check REUSE compliance
+ run: |
+ reuse lint