Skip to content

Commit

Permalink
Separate the workflows so that deploy only runs on tag creation
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Mar 20, 2024
1 parent 9b89be6 commit fc43594
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 28 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,3 @@ jobs:
cache: 'pip'
- run: pip install ansible-core==2.12.1 ansible-lint==5.2.1 rich~=10.0.0 # https://github.com/ansible-community/ansible-lint/issues/1795
- run: ansible-lint
release:
needs:
- test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.2.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: main
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy to Ansible Galaxy

on:
push:
# Pattern matched against refs/tags
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta

jobs:
release:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.2.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
17 changes: 0 additions & 17 deletions .github/workflows/test-and-deploy.yml

This file was deleted.

0 comments on commit fc43594

Please sign in to comment.