Release features and generate docs #131
This file contains hidden or 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 features and generate docs" | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Validate features"] | |
| types: [completed] | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| if: | | |
| ${{ github.ref == 'refs/heads/main' }} && | |
| ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: "Publish Features" | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-features: "true" | |
| base-path-to-features: "./src" | |
| generate-docs: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.VAULT_TOKEN_OCI }} | |
| - name: Create Documentation | |
| id: push_image_info | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.VAULT_TOKEN_OCI }} | |
| run: | | |
| set -e | |
| echo "Start." | |
| # Configure git and Push updates | |
| git config --global user.email [email protected] | |
| git config --global user.name github-actions | |
| git config pull.rebase false | |
| message='Add generate features docs' | |
| # Add / update and commit | |
| git add */**/README.md | |
| git commit -m 'Automated documentation update' || export NO_UPDATES=true | |
| # Push | |
| if [ "$NO_UPDATES" != "true" ] ; then | |
| git push origin main | |
| fi |