diff options
author | Josh Spicer <joshspicer@github.com> | 2022-06-14 03:01:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 03:01:19 +0300 |
commit | 2fa323248528604a3548fd1292c74c7b473c611b (patch) | |
tree | 39831944b1ed879a3342310b6f2a107e48153aad /.github/workflows | |
parent | fac5e5a4540ffc79138b94ce8edfd329a209b250 (diff) |
Devcontainer docs (#47)
* docs
* automatically generate documentation from features.json
* trigger doc gen
* 1
* no-ci
* no-ci
* no-ci
* no-ci
* comment out pull
* Automated documentation update
* no-ci markdown table
* Automated documentation update
* no-ci
* Automated documentation update
* branch to main
Co-authored-by: Devcontainers CI <vscr-feedback@microsoft.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/release-v1.yaml | 2 | ||||
-rw-r--r-- | .github/workflows/release.yaml | 2 | ||||
-rw-r--r-- | .github/workflows/update-documentation.yml | 49 |
3 files changed, 51 insertions, 2 deletions
diff --git a/.github/workflows/release-v1.yaml b/.github/workflows/release-v1.yaml index cc5e42a..adbfab9 100644 --- a/.github/workflows/release-v1.yaml +++ b/.github/workflows/release-v1.yaml @@ -22,7 +22,7 @@ jobs: run: sudo apt install tree -y && tree - name: Generate tgz - uses: microsoft/publish-dev-container-features-action@main # devcontainers/action + uses: microsoft/publish-dev-container-features-action@main with: publish-features: "true" path-to-features: "./src" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c271e03..4b59eb9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v2 - name: Generate tgz - uses: ./.github/devcontainers-action # devcontainers/ci + uses: ./.github/devcontainers-action # devcontainers/action with: publish-features: "true" base-path-to-features: "./src" diff --git a/.github/workflows/update-documentation.yml b/.github/workflows/update-documentation.yml new file mode 100644 index 0000000..cc7da8d --- /dev/null +++ b/.github/workflows/update-documentation.yml @@ -0,0 +1,49 @@ +name: "Update Documentation" +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Generate Documentation + uses: ./.github/devcontainers-action # devcontainers/action + with: + generate-docs: "true" + base-path-to-features: "./src" + + - name: Add and Commit Documentation + id: push_image_info + run: | + set -e + echo "Start." + + GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)') + if [ "$GIT_BRANCH" == "" ]; then + echo "ERR: Could not determine branch." + exit 1 + fi + + echo "GIT_BRANCH = ${GIT_BRANCH}" + + git config --global user.email "vscr-feedback@microsoft.com" + git config --global user.name "Devcontainers CI" + git config pull.rebase false + + # # Pull in anything that may have come in + # git pull "https://ci:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" "HEAD:$GIT_BRANCH" + + # Add / update and commit + git add */**/README.md + git status + git commit -m 'Automated documentation update' || export NO_UPDATES=true + + # Push + if [ "$NO_UPDATES" != "true" ] ; then + git push "https://ci:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" "HEAD:$GIT_BRANCH" + fi
\ No newline at end of file |