From 7c98b07e26c59c554acc1a547efd3b650ea5fa11 Mon Sep 17 00:00:00 2001 From: Tomas Karasek Date: Thu, 6 Apr 2023 13:19:58 +0200 Subject: [PATCH] add action for anslible gaxlaxy releaase --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..df7836d --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}