diff --git a/.drone.yml b/.drone.yml index 953a1b0..861eaca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,12 +1,15 @@ --- kind: pipeline type: docker -name: Autorestic Role Checks +name: Autorestic Role Lint + +trigger: + event: + - push steps: - name: ansible-lint + yamllint image: fuzzymistborn/docker-linting:latest - environment: commands: - "ansible-lint ." - "yamllint ." @@ -22,3 +25,33 @@ steps: message: "{{#success build.status}}āœ… Build for `{{repo.name}}` was *successful*!{{else}}āŒ Build for `{{repo.name}}` has *FAILED*!{{/success}} \nšŸŒ [Output]({{build.link}})\nšŸ“ Commit: {{ commit.message }}" when: status: [ success, failure ] + +--- +kind: pipeline +type: docker +name: Autorestic Role Publish to Galaxy + +trigger: + event: + - tag + +steps: + - name: Push + image: fuzzymistborn/docker-linting:latest + environment: + GALAXY_API_KEY: + from_secret: galaxy_api_key + commands: + - ansible-galaxy role import --api-key $GALAXY_API_KEY FuzzyMistborn ansible-role-autorestic + + - name: Send TG Notification + image: appleboy/drone-telegram + settings: + token: + from_secret: tg_token + to: + from_secret: tg_id + format: markdown + message: "{{#success build.status}}āœ… Push to Ansible Galaxy for `{{repo.name}}` was *successful*!{{else}}āŒ Push to Ansible Galaxy for `{{repo.name}}` has *FAILED*!{{/success}} \nšŸŒ [Output]({{build.link}})" + when: + status: [ success, failure ] \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 26b5a5a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# This workflow requires a GALAXY_API_KEY secret present in the GitHub -# repository or organization. -# -# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy - -name: Deploy Release to Ansible Galaxy - -on: - release: - types: [released] - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v2 - - name: galaxy - uses: robertdebock/galaxy-action@1.1.0 - with: - galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}