Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
path: ${{github.workspace}}/ansible_collections/adhawkins/borgbase
path: ${{github.workspace}}/ansible_collections/mireiawen/borgbase

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -30,24 +30,24 @@ jobs:

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(grep "^version:" ${{ github.workspace }}/ansible_collections/adhawkins/borgbase/galaxy.yml | cut -f2 -d ' ')
run: echo ::set-output name=VERSION::$(grep "^version:" ${{ github.workspace }}/ansible_collections/mireiawen/borgbase/galaxy.yml | cut -f2 -d ' ')

- name: Create checksum
working-directory: ${{github.workspace}}/adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }}/
working-directory: ${{github.workspace}}/mireiawen-borgbase-${{ steps.get_version.outputs.VERSION }}/
run: |
sha256sum *.tar.gz > ${{github.workspace}}/checksum.txt

- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{github.workspace}}/adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
${{github.workspace}}/mireiawen-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
checksum.txt

- name: Upload to ansible-galaxy dev
run: ansible-galaxy collection publish --server https://galaxy-dev.ansible.com/ --token ${{ secrets.ANSIBLE_GALAXY_DEV_TOKEN }} ${{ github.workspace }}/adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
run: ansible-galaxy collection publish --server https://galaxy-dev.ansible.com/ --token ${{ secrets.ANSIBLE_GALAXY_DEV_TOKEN }} ${{ github.workspace }}/mireiawen-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
if: "contains(github.ref, 'test')"

- name: Upload to ansible-galaxy
run: ansible-galaxy collection publish --token ${{ secrets.ANSIBLE_GALAXY_TOKEN }} ${{ github.workspace }}/adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
if: "!contains(github.ref, 'test')"
run: ansible-galaxy collection publish --token ${{ secrets.ANSIBLE_GALAXY_TOKEN }} ${{ github.workspace }}/mireiawen-borgbase-${{ steps.get_version.outputs.VERSION }}/*.tar.gz
if: "!contains(github.ref, 'test')"
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
path: ${{github.workspace}}/ansible_collections/adhawkins/borgbase
path: ${{github.workspace}}/ansible_collections/mireiawen/borgbase

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -25,25 +25,25 @@ jobs:
run: pip install ansible

- name: Install module
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase
working-directory: ${{github.workspace}}/ansible_collections/mireiawen/borgbase
run: ansible-galaxy collection install .

- name: Build module
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase
working-directory: ${{github.workspace}}/ansible_collections/mireiawen/borgbase
run: ansible-galaxy collection build --output-path ${{github.workspace}}

- name: Display
run: ls -l ${{github.workspace}}

- name: Run test
working-directory: ${{github.workspace}}/ansible_collections/adhawkins/borgbase
working-directory: ${{github.workspace}}/ansible_collections/mireiawen/borgbase
run: ansible-test sanity --docker --color yes -v

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(grep "^version:" ${{github.workspace}}/ansible_collections/adhawkins/borgbase/galaxy.yml | cut -f2 -d ' ')
run: echo ::set-output name=VERSION::$(grep "^version:" ${{github.workspace}}/ansible_collections/mireiawen/borgbase/galaxy.yml | cut -f2 -d ' ')

- uses: actions/upload-artifact@v2
with:
name: adhawkins-borgbase-${{ steps.get_version.outputs.VERSION }}
name: mireiawen-borgbase-${{ steps.get_version.outputs.VERSION }}
path: ${{github.workspace}}/*.tar.gz
5 changes: 3 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: adhawkins
namespace: mireiawen

# The name of the collection. Has the same character restrictions as 'namespace'
name: borgbase

# The version of the collection. Must be compatible with semantic versioning
version: 1.0.3
version: 1.0.4

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand All @@ -18,6 +18,7 @@ readme: README.md
# @nicks:irc/im.site#channel'
authors:
- Andy Hawkins <andy@gently.org.uk>
- Mira Manninen <mir@mireiawen.net>

### OPTIONAL but strongly recommended

Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/borgbase_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class BorgBaseClient:
'''

SSH_DELETE = '''
mutation sshDelete($id: Int!) {
mutation sshDelete($id: String!) {
sshDelete(id: $id) {
ok
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/borgbase_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def runModule():

if not module.check_mode:
if deleteRequired:
deleteResult = deleteKey(int(foundKey['id']), apiKey=module.params['apikey'])
deleteResult = deleteKey(foundKey['id'], apiKey=module.params['apikey'])
if not deleteResult['success']:
result['msg'] = ' '

Expand Down
Loading