Skip to content

Merge pull request #15 from dbrennand/issue/#12 #9

Merge pull request #15 from dbrennand/issue/#12

Merge pull request #15 from dbrennand/issue/#12 #9

Workflow file for this run

name: Ansible Release
on:
push:
tags:
- "*"
defaults:
run:
working-directory: "dbrennand.autorestic"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: "dbrennand.autorestic"
- id: repository_name
run: echo "::set-output name=repository_name::$(echo ${{ github.repository }} | cut -d / -f 2)"
- id: role_name
run: echo "::set-output name=role_name::$(yq -r '.galaxy_info.role_name' meta/main.yml)"
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip3 install ansible-core
- run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} --role-name ${{ steps.role_name.outputs.role_name }} ${{ github.repository_owner }} ${{ steps.repository_name.outputs.repository_name }}