Skip to content

Commit

Permalink
actions: create PR for webtop's builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Amygos committed Oct 9, 2023
1 parent 7138ca0 commit f3ebdca
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Development
on:
workflow_dispatch:

jobs:
update_create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current stable version
id: get_version
run: echo "::set-output name=version::$(cat webtop5-build/VERSION)"
- name: Get current stable version
id: get_date
run: |
export TZ=Europe/Rome
echo "::set-output name=current::$(date)"
- name: Set development version
run: echo "development-${{ steps.get_date.outputs.current }}" > webtop5-build/VERSION
- name: Create/Update pull request
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ steps.get_version.outputs.version }}-next
title: Update to upstream release ${{ steps.get_version.outputs.version }}-next
body: ''
commit-message: Update development war ${{ steps.get_date.outputs.current }}
draft: true
token: ${{ secrets.webtop_pr }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Release
on:
workflow_dispatch:
inputs:
version:
description: 'WebTop Version'
required: true

jobs:
update_create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current stable version
id: get_version
run: echo "::set-output name=version::$(cat webtop5-build/VERSION)"
- name: Set new version
run: echo "wt-${{ github.event.inputs.version }}" > webtop5-build/VERSION
- name: Create/Update pull request
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ steps.get_version.outputs.version }}-next
title: Update to upstream release wt-${{ github.event.inputs.version }}
body: ''
commit-message: Update to upstream release wt-${{ github.event.inputs.version }}
draft: false
token: ${{ secrets.webtop_pr }}
27 changes: 27 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Staging
on:
workflow_dispatch:
inputs:
war:
description: 'WAR number'
required: true

jobs:
update_create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current stable version
id: get_version
run: echo "::set-output name=version::$(cat webtop5-build/VERSION)"
- name: Set staging version
run: echo "staging-${{ github.event.inputs.war }}" > webtop5-build/VERSION
- name: Create/Update pull request
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ steps.get_version.outputs.version }}-next
title: Update to upstream release ${{ steps.get_version.outputs.version }}-next
body: ''
commit-message: Update staging war ${{ github.event.inputs.war }}
draft: true
token: ${{ secrets.webtop_pr }}

0 comments on commit f3ebdca

Please sign in to comment.