Release routines #537
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release routines | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
command_name: | |
description: 'Command Name' | |
required: true | |
default: 'snapshot:create' | |
type: choice | |
options: | |
- snapshot:create | |
- release:sync | |
schedule: | |
- cron: '10 0 * * *' | |
jobs: | |
build: | |
name: PHP 7.2 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Install Dependencies | |
uses: ramsey/composer-install@v3 | |
- name: Install Box Project | |
run: | | |
wget https://github.com/box-project/box/releases/download/3.9.1/box.phar | |
chmod +x box.phar | |
mv box.phar /usr/local/bin/box | |
- name: Prepare SVN-Buddy installation | |
run: | | |
rm -Rf workspace/repository | |
git clone https://github.com/console-helpers/svn-buddy.git workspace/repository | |
composer --working-dir=workspace/repository install --no-dev | |
- name: Execute release routine | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
USER_INPUT=${{ inputs.command_name }} | |
COMMAND_NAME=${USER_INPUT:-"snapshot:create"} | |
bin/svn-buddy-updater $COMMAND_NAME --ansi | |
- name: Commit releases database | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Commit releases database | |
file_pattern: 'releases.json' |