2023-04-29 20:54:56 +02:00
name : Push on GitHub (REUSABLE)
on :
workflow_call :
inputs :
VERSION :
required : true
type : string
PRERELEASE :
required : true
type : boolean
jobs :
build :
runs-on : ubuntu-latest
steps :
# Checkout
2023-10-18 06:15:57 +02:00
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2023-04-29 20:54:56 +02:00
# Get PDF doc
- name : Get documentation
2023-08-15 11:44:27 +02:00
if : inputs.VERSION != 'testing'
2023-10-02 18:30:17 +02:00
uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
2023-04-29 20:54:56 +02:00
with :
name : BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
# Create tag
2023-11-09 09:56:01 +01:00
- uses : rickstaa/action-create-tag@861755f3fcbce1b21a65c17bad10e7d35c27b6d9 # v1.7.1
2023-04-29 20:54:56 +02:00
name : Create tag
2023-08-15 11:44:27 +02:00
if : inputs.VERSION != 'testing'
2023-04-29 20:54:56 +02:00
with :
tag : "v${{ inputs.VERSION }}"
message : "v${{ inputs.VERSION }}"
2023-05-02 11:50:02 +02:00
force_push_tag : true
2023-08-15 11:40:05 +02:00
# Create tag
2023-11-09 09:56:01 +01:00
- uses : rickstaa/action-create-tag@861755f3fcbce1b21a65c17bad10e7d35c27b6d9 # v1.7.1
2023-08-15 11:40:05 +02:00
name : Create tag
2023-08-15 11:44:27 +02:00
if : inputs.VERSION == 'testing'
2023-08-15 11:40:05 +02:00
with :
tag : "${{ inputs.VERSION }}"
message : "${{ inputs.VERSION }}"
force_push_tag : true
2023-04-29 20:54:56 +02:00
# Extract changelog
- name : Extract changelog
2023-08-15 11:44:27 +02:00
if : inputs.VERSION != 'testing'
2023-04-29 20:54:56 +02:00
id : getchangelog
2023-05-02 11:50:02 +02:00
run : |
content=$(awk -v n=2 '/##/{n--}; n > 0' CHANGELOG.md | grep -v '# Changelog' | grep -v '##' | sed '/^$/d')
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
2023-10-16 12:33:08 +02:00
echo "content=$content" >> $GITHUB_OUTPUT
2023-04-29 20:54:56 +02:00
# Create release
- name : Create release
2023-08-15 11:44:27 +02:00
if : inputs.VERSION != 'testing'
2023-10-02 18:30:17 +02:00
uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
2023-04-29 20:54:56 +02:00
with :
body : |
Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/
2023-09-29 19:11:48 +02:00
Docker tags :
2023-08-26 14:42:32 +02:00
- BunkerWeb : `bunkerity/bunkerweb:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb:${{ inputs.VERSION }}`
- Scheduler : `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}`
- Autoconf : `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}`
- UI : `bunkerity/bunkerweb-ui:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-ui:${{ inputs.VERSION }}`
2023-04-29 20:54:56 +02:00
Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist=
2023-09-29 19:11:48 +02:00
Changelog :
2023-05-02 11:50:02 +02:00
${{ steps.getchangelog.outputs.content }}
2023-04-29 21:43:26 +02:00
draft : true
2023-04-29 20:54:56 +02:00
prerelease : ${{ inputs.PRERELEASE }}
name : v${{ inputs.VERSION }}
tag_name : v${{ inputs.VERSION }}
discussion_category_name : Announcements
2023-05-02 11:50:02 +02:00
files : BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
2023-08-15 11:40:05 +02:00
# Create release
- name : Create release
2023-08-15 11:44:27 +02:00
if : inputs.VERSION == 'testing'
2023-10-02 18:30:17 +02:00
uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
2023-08-15 11:40:05 +02:00
with :
body : |
**The testing version of BunkerWeb should not be used in production, please use the latest stable version instead.**
Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/
2023-09-29 19:11:48 +02:00
Docker tags :
2023-08-26 14:42:32 +02:00
- BunkerWeb : `bunkerity/bunkerweb:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb:${{ inputs.VERSION }}`
- Scheduler : `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}`
- Autoconf : `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}`
- UI : `bunkerity/bunkerweb-ui:${{ inputs.VERSION }}` or `ghcr.io/bunkerity/bunkerweb-ui:${{ inputs.VERSION }}`
2023-08-15 11:40:05 +02:00
Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist=
2023-08-26 14:42:32 +02:00
Please note that when using Linux Debian or Ubuntu integration, you will need to add the `force-bad-version` directive to your `/etc/dpkg/dpkg.cfg` file before installing the testing version of BunkerWeb.
2023-08-15 11:40:05 +02:00
draft : false
prerelease : ${{ inputs.PRERELEASE }}
name : Testing
tag_name : ${{ inputs.VERSION }}