Skip to content

Commit

Permalink
Refactor release workflow with makefile target
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Feb 28, 2024
1 parent d2657a7 commit e18991e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# See: https://github.com/ansible/galaxy/issues/46

---
name: release

on:
Expand All @@ -17,24 +18,31 @@ defaults:
working-directory: 'nephelaiio.growfs'

jobs:

release:
name: release
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
- name: Check out the codebase
uses: actions/checkout@v3
with:
path: 'nephelaiio.growfs'

- name: Set up Python 3.
uses: actions/setup-python@v2
- name: set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install Ansible.
run: pip3 install ansible-base
- name: Update ubuntu repositories
run: sudo apt-get update

- name: Install make
run: sudo apt-get install -y make

- name: Install dependencies
run: make install

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo $GITHUB_REPOSITORY | cut -d/ -f1) $(echo $GITHUB_REPOSITORY | cut -d/ -f2)
- name: Trigger a new import on galaxy
run: make publish
env:
GALAXY_API_KEY: "${{ secrets.GALAXY_API_KEY }}"
GITHUB_REPOSITORY: "${{ github.repository }}"
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
fileignoreconfig:
- filename: .github/workflows/release.yml
ignore_detectors: [filecontent]
- filename: pyproject.toml
ignore_detectors: [filecontent]
- filename: poetry.lock
Expand Down

0 comments on commit e18991e

Please sign in to comment.