2021-04-23 07:10:02 +00:00
|
|
|
name: Publish release
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: Tag to publish
|
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
2021-05-27 01:00:07 +00:00
|
|
|
extract_channel:
|
|
|
|
name: Extract the release channel
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Extract release channel from tag
|
|
|
|
id: extract
|
|
|
|
run: |
|
|
|
|
if [[ ${{ github.event.inputs.tag }} =~ ^core@[0-9]{4}\.[0-9]+\.[0-9]+$ ]]; then
|
|
|
|
echo ::set-output name=channel::stable
|
|
|
|
fi
|
|
|
|
outputs:
|
|
|
|
channel: ${{ steps.extract.outputs.channel }}
|
|
|
|
|
2021-04-23 07:10:02 +00:00
|
|
|
apt_repository:
|
|
|
|
name: Publish to apt repository
|
|
|
|
runs-on: ubuntu-latest
|
2021-05-27 01:00:07 +00:00
|
|
|
needs: extract_channel
|
|
|
|
if: needs.extract_channel.outputs.channel == 'stable'
|
2021-04-23 07:10:02 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Download .deb from GitHub release
|
|
|
|
uses: MrOctopus/download-asset-action@5b7c3c9bcb75047bb7aaad45718403b413cc0290
|
|
|
|
id: download
|
|
|
|
with:
|
|
|
|
tag: "${{ github.event.inputs.tag }}"
|
|
|
|
asset: ".deb"
|
|
|
|
|
|
|
|
- name: Upload .deb to Pulp
|
2021-08-25 11:56:13 +00:00
|
|
|
uses: docker://kong/release-script:latest
|
2021-04-23 07:10:02 +00:00
|
|
|
env:
|
|
|
|
PULP_USERNAME: ${{ secrets.PULP_USERNAME }}
|
|
|
|
PULP_PASSWORD: ${{ secrets.PULP_PASSWORD }}
|
|
|
|
PULP_HOST: ${{ secrets.PULP_HOST }}
|
|
|
|
with:
|
|
|
|
entrypoint: python3
|
2021-08-25 11:56:13 +00:00
|
|
|
args: '/usr/src/code/main.py release --file ${{ steps.download.outputs.name }} --dist-name ubuntu --dist-version focal --package-type insomnia --publish'
|