Add --rebuild flag and fix symlink creation timing #4
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish features to GHCR | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-features: "true" | |
| base-path-to-features: "./src" | |
| generate-docs: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create PR for documentation updates | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| id: push_docs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -e | |
| # Check if there are any documentation changes | |
| if git diff --quiet HEAD -- src/; then | |
| echo "No documentation changes to commit" | |
| exit 0 | |
| fi | |
| # Configure git | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Create a new branch for docs | |
| BRANCH="docs-update-$(date +%Y%m%d%H%M%S)" | |
| git checkout -b "$BRANCH" | |
| # Stage and commit documentation changes | |
| git add src/ | |
| git commit -m "Automated documentation update [skip ci]" || exit 0 | |
| # Push and create PR | |
| git push origin "$BRANCH" | |
| gh pr create \ | |
| --title "Automated documentation update" \ | |
| --body "This PR contains automatically generated documentation updates." \ | |
| --base main \ | |
| --head "$BRANCH" |