Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma authored Feb 1, 2022
1 parent f7bb95f commit 82c7bf6
Showing 1 changed file with 10 additions and 37 deletions.
47 changes: 10 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,18 @@
---
# 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
# See: https://github.com/ansible/galaxy/issues/46

name: Release
'on':
pull_request:
push:
branches:
- master
schedule:
- cron: "00 0 * * 2"
workflow_dispatch:
# Ansible managed
#

defaults:
run:
working-directory: 'buluma.haproxy'
name: Release to Ansible Galaxy

on:
release:
types: [created, edited, published, released]
jobs:

release:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
- name: galaxy
uses: buluma/galaxy-action@v1.0.1
with:
path: 'buluma.haproxy'

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

- name: Install Ansible.
run: pip3 install ansible-base

- name: Check Role info
run: ansible-galaxy role info buluma.haproxy

- 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)
galaxy_api_key: ${{ secrets.galaxy_api_key }}

0 comments on commit 82c7bf6

Please sign in to comment.