Skip to content

Deploy and Octopus workflows #18

Deploy and Octopus workflows

Deploy and Octopus workflows #18

name: Octopus
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
OCTOPUS_SPACE: 'Default'
jobs:
release-version:
name: Get Release Version
permissions:
contents: write
outputs:
version: ${{ steps.get_version.outputs.version }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
ref: "main"
- name: Install poetry and dependencies
run: pip install poetry
# update the version number in the phdi/__init.py__ file
- name: Get PHDI Version
id: get_version
run: |
VERSION_WITH_PHDI=$(poetry version)
echo "version=${VERSION_WITH_PHDI:5}" >> $GITHUB_OUTPUT
octopus:
runs-on: ubuntu-latest
needs: release-version
permissions:
id-token: write # Required for authentication
steps:
- name: Login to Octopus 🐙
uses: OctopusDeploy/login@v1
with:
server: ${{ secrets.OCTOPUS_URL }}
service_account_id: ${{ secrets.OCTOPUS_SERVICE_ACCOUNT_ID }}
- name: Create a release in Octopus 🐙
uses: OctopusDeploy/create-release-action@v3
with:
project: 'Data Ingestion Building Blocks'
channel: "Channel alis/46"
package_version: ${{ needs.release-version.outputs.version }}