From 25bbb55a51cc0d3ff871b75137a741fbee200579 Mon Sep 17 00:00:00 2001 From: KB-perByte Date: Fri, 12 Jan 2024 20:06:58 +0530 Subject: [PATCH] update name for GHA --- .github/dependabot.yml | 2 +- .github/workflows/changelog.yaml | 2 +- .github/workflows/integration.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- .github/workflows/sanity.yaml | 4 ++-- .github/workflows/unit.yaml | 4 ++-- README.md | 16 +++++++-------- action.yml | 2 +- docs/ci.md | 10 +++++----- docs/release.md | 32 +++++++++++++++++++++++++----- docs/usage.md | 20 +++++++++---------- 11 files changed, 61 insertions(+), 39 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c79922f..b180514 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,7 @@ --- version: 2 updates: - - package-ecosystem: "ansible-github-actions" + - package-ecosystem: "ansible-content-actions" directory: "/" schedule: interval: daily diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 839b28a..9d71182 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -15,4 +15,4 @@ jobs: fetch-depth: "0" - name: Validate changelog uses: >- - ansible/ansible-github-actions/.github/actions/ansible_validate_changelog@main + ansible/ansible-content-actions/.github/actions/ansible_validate_changelog@main diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 6b62073..685ad2d 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -21,7 +21,7 @@ jobs: with: python-version: "3.11" - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: "Install tox-ansible, includes tox" run: "python -m pip install git+https://github.com/ansible/tox-ansible.git" - name: Generate matrix @@ -49,7 +49,7 @@ jobs: with: python-version: "${{ matrix.entry.python }}" - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: "Install tox-ansible, includes tox" run: python -m pip install tox-ansible - name: Install build toolchain and openssl headers on Linux diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d563790..a52c229 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,13 +22,13 @@ name: Release collection required: false jobs: release_automation_hub: - uses: ansible/ansible-github-actions/.github/workflows/release_ah.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/release_ah.yaml@main with: environment: release secrets: ah_token: "${{ secrets.ah_token }}" release_galaxy: - uses: ansible/ansible-github-actions/.github/workflows/release_galaxy.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/release_galaxy.yaml@main needs: - release_automation_hub with: diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index a4e00c4..1871e21 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -23,7 +23,7 @@ jobs: - name: "Install tox-ansible, includes tox" run: "python -m pip install git+https://github.com/ansible/tox-ansible.git" - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: Generate matrix id: generate-matrix run: > @@ -51,7 +51,7 @@ jobs: - name: "Install tox-ansible, includes tox" run: python -m pip install tox-ansible - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: Run tox sanity tests run: >- python -m tox --ansible -e ${{ matrix.entry.name }} --conf diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index a311510..9f3e79d 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -26,7 +26,7 @@ jobs: with: python-version: "3.11" - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: "Install tox-ansible, includes tox" run: "python -m pip install git+https://github.com/ansible/tox-ansible.git" - name: Generate matrix @@ -56,7 +56,7 @@ jobs: - name: "Install tox-ansible, includes tox" run: python -m pip install tox-ansible - name: "Check for tox-ansible.ini file, else add default" - uses: ansible/ansible-github-actions/.github/actions/add_tox_ansible@main + uses: ansible/ansible-content-actions/.github/actions/add_tox_ansible@main - name: Install build toolchain and openssl headers on Linux shell: bash run: sudo apt update && sudo apt install build-essential libssl-dev diff --git a/README.md b/README.md index c511a6c..5560ac1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Combine GitHub Actions to create a streamlined workflow for testing Ansible coll ## Usage To use the action add the following step to your workflow file (e.g. -`ansible/ansible-github-actions/.github/workflows/sanity.yaml@main`) +`ansible/ansible-content-actions/.github/workflows/sanity.yaml@main`) Filename: `test.yaml` @@ -28,16 +28,16 @@ on: jobs: changelog: - uses: ansible/ansible-github-actions/.github/workflows/changelog.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main if: github.event_name == 'pull_request' ansible-lint: - uses: ansible/ansible-github-actions/.github/workflows/ansible_lint.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main sanity: - uses: ansible/ansible-github-actions/.github/workflows/sanity.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main unit-galaxy: - uses: ansible/ansible-github-actions/.github/workflows/unit.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main integration: - uses: ansible/ansible-github-actions/.github/workflows/integration.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main all_green: if: ${{ always() }} needs: @@ -80,8 +80,8 @@ Please read [Contribution guidelines] if you wish to contribute. # Licensing -The ansible-github-actions project is distributed as [MIT License]. +The ansible-content-actions project is distributed as [MIT License]. # Authors -ansible-github-actions is owned by [Ansible] by [Red Hat] project. +ansible-content-actions is owned by [Ansible] by [Red Hat] project. diff --git a/action.yml b/action.yml index 65cf297..ac12775 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ --- -name: ansible-github-actions +name: ansible-content-actions description: This is a monolithic action for Ansible content testing author: Ansible Devtools Team branding: diff --git a/docs/ci.md b/docs/ci.md index b6a9a6d..41f7072 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -21,16 +21,16 @@ on: jobs: changelog: - uses: ansible/ansible-github-actions/.github/workflows/changelog.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main if: github.event_name == 'pull_request' ansible-lint: - uses: ansible/ansible-github-actions/.github/workflows/ansible_lint.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main sanity: - uses: ansible/ansible-github-actions/.github/workflows/sanity.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main unit-galaxy: - uses: ansible/ansible-github-actions/.github/workflows/unit.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main integration: - uses: ansible/ansible-github-actions/.github/workflows/integration.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main all_green: if: ${{ always() }} needs: diff --git a/docs/release.md b/docs/release.md index ca8d16d..f24bed6 100644 --- a/docs/release.md +++ b/docs/release.md @@ -5,7 +5,7 @@ This GitHub action releases the collection in Ansible Automation Hub and Ansible `AH_TOKEN`: The Automation Hub token required for to interact with Ansible Automation Hub. `ANSIBLE_GALAXY_API_KEY`: A Galaxy token required to interact with Ansible Galaxy. -Note - ansible-github-actions/release.yaml uses release_ah.yaml and release_galaxy.yaml internally. +Note - ansible-content-actions/release.yaml uses release_ah.yaml and release_galaxy.yaml internally. Filename: `release.yaml` @@ -18,7 +18,7 @@ on: jobs: release: - uses: ansible/ansible-github-actions/.github/workflows/release.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/release.yaml@main with: environment: release secrets: @@ -34,20 +34,20 @@ The release works in two parts, Automation hub release and then Ansible Galaxy r Example showing how only Automation hub release can be made, only `ah_token` would be required in those cases. -### The release on AH workflow +### Release on AH only, workflow Filename: `release.yaml` ``` --- -name: "Release collection" +name: "Release collection on AH" on: release: types: [published] jobs: release_automation_hub: - uses: ansible/ansible-github-actions/.github/workflows/release_ah.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/release_ah.yaml@main with: environment: release secrets: @@ -56,6 +56,28 @@ jobs: Same for galaxy releases only, please refer to the `release_galay.yaml` and specify `ansible_galaxy_api_key` secret. +### Release on Galaxy only, workflow + +Filename: `release.yaml` + +``` +--- +name: "Release collection on Galaxy" +on: + release: + types: [published] + +jobs: + release_automation_hub: + uses: ansible/ansible-content-actions/.github/workflows/release_galaxy.yaml@main + with: + environment: release + secrets: + ah_token: ${{ secrets.ANSIBLE_GALAXY_API_KEY }} +``` + +Same for galaxy releases only, please refer to the `release_galay.yaml` and specify `ansible_galaxy_api_key` secret. + ## Detailed release process ### Things to make sure of before release: diff --git a/docs/usage.md b/docs/usage.md index 903c5f5..b822e5c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -26,16 +26,16 @@ on: jobs: changelog: - uses: ansible/ansible-github-actions/.github/workflows/changelog.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main if: github.event_name == 'pull_request' ansible-lint: - uses: ansible/ansible-github-actions/.github/workflows/ansible_lint.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main sanity: - uses: ansible/ansible-github-actions/.github/workflows/sanity.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main unit-galaxy: - uses: ansible/ansible-github-actions/.github/workflows/unit.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main integration: - uses: ansible/ansible-github-actions/.github/workflows/integration.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/integration.yaml@main all_green: if: ${{ always() }} needs: @@ -64,7 +64,7 @@ This GitHub action releases the collection in Ansible Automation Hub and Ansible `AH_TOKEN`: The Automation Hub token required for to interact with Ansible Automation Hub. `ANSIBLE_GALAXY_API_KEY`: A Galaxy token required to interact with Ansible Galaxy. -Note - ansible-github-actions/release.yaml uses release_ah.yaml and release_galaxy.yaml internally. +Note - ansible-content-actions/release.yaml uses release_ah.yaml and release_galaxy.yaml internally. Filename: `release.yaml` @@ -77,7 +77,7 @@ on: jobs: release: - uses: ansible/ansible-github-actions/.github/workflows/release.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/release.yaml@main with: environment: release secrets: @@ -102,7 +102,7 @@ on: types: [opened, labeled, unlabeled, synchronize] jobs: check_label: - uses: ansible/ansible-github-actions/.github/workflows/check_label.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/check_label.yaml@main ``` ## The release drafter workflow (previously push) @@ -127,7 +127,7 @@ env: ANSIBLE_COLLECTIONS_PATHS: ./ jobs: update_release_draft: - uses: ansible/ansible-github-actions/.github/workflows/draft_release.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/draft_release.yaml@main with: repo: ${{ github.event.pull_request.head.repo.full_name }} secrets: @@ -152,7 +152,7 @@ on: jobs: refresh: - uses: ansible/ansible-github-actions/.github/workflows/refresh_ah_token.yaml@main + uses: ansible/ansible-content-actions/.github/workflows/refresh_ah_token.yaml@main with: environment: release secrets: