Skip to content

Release

Release #7

Workflow file for this run

name: 'Release'
on:
pull_request:
types: [closed]
branches: [main]
paths: ['src/**']
workflow_dispatch:
jobs:
deploy:
name: 'Deploy'
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == vars.GH_ACTIONS_USERNAME || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
packages: write
steps:
- uses: actions/checkout@v4
- name: 'Publish Features'
uses: devcontainers/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
publish-features: 'true'
base-path-to-features: './src'
generate-docs: 'true'
- name: Create PR for Documentation
id: push_image_info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
echo "Start."
git config --global user.email ${{vars.GH_ACTIONS_USERNAME}}@users.noreply.github.com
git config --global user.name ${{vars.GH_ACTIONS_USERNAME}}
git config pull.rebase false
branch=automated-documentation-update-$GITHUB_RUN_ID
git checkout -b $branch
message='Automated documentation update'
git add */**/README.md
git commit -m 'docs(src/all): Automated documentation update [skip ci]' || export NO_UPDATES=true
if [ "$NO_UPDATES" != "true" ] ; then
git push origin "$branch"
gh pr create --title "$message" --body "$message"
fi