Skip to content

Commit

Permalink
Merge pull request #84 from equinix-labs/release_wf
Browse files Browse the repository at this point in the history
Add Github Action for Ansible Galaxy release
  • Loading branch information
t0mk authored Apr 14, 2023
2 parents a2fbd8e + 7c98b07 commit ad6ccba
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).

name: release
on:
workflow_dispatch: null
release:
types: [ published ]
jobs:
galaxyrelease:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .ansible/collections/ansible_collections/equinix/cloud
environment: 'METAL_API_TOKEN'
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
path: .ansible/collections/ansible_collections/equinix/cloud

- name: update packages
run: sudo apt-get update -y

- name: install make
run: sudo apt-get install -y build-essential

- name: setup python 3
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt

- name: publish the collection
run: make publish
env:
GALAXY_TOKEN: ${{ secrets.GALAXY_TOKEN }}
COLLECTION_VERSION: ${{ github.event.release.tag_name }}

0 comments on commit ad6ccba

Please sign in to comment.