Workflow file for this run
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-template | |
| on: | |
| push: | |
| branches: | |
| - fix-template-build | |
| - main | |
| paths: | |
| - .github/workflows/release-template.yml | |
| - template/** | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check version consistency | |
| run: | | |
| TEMPLATE_VERSION=$(jq -r '.version' template/devcontainer-template.json) | |
| DEVCONTAINER_VERSION=$(cat template/.devcontainer/VERSION | tr -d '[:space:]') | |
| if [ "$TEMPLATE_VERSION" != "$DEVCONTAINER_VERSION" ]; then | |
| echo "Version mismatch: devcontainer-template.json has '$TEMPLATE_VERSION' but .devcontainer/VERSION has '$DEVCONTAINER_VERSION'" | |
| exit 1 | |
| fi | |
| echo "Versions match: $TEMPLATE_VERSION" | |
| # - name: Login to GitHub Container Registry | |
| # uses: docker/login-action@v3 | |
| # with: | |
| # registry: ghcr.io | |
| # username: ${{ github.actor }} | |
| # password: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: Publish template | |
| # run: npx --yes @devcontainers/cli templates publish ./template -n ${{ github.repository }} | |
| # | |
| # - name: Publish template | |
| # uses: devcontainers-community/publish-template@v1 | |
| # with: | |
| # path: ./template | |
| # image: ghcr.io/${{ github.repository }}/* | |
| - name: Publish template | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-templates: "true" | |
| base-path-to-templates: "./template" | |
| generate-docs: "false" | |
| disable-schema-validation: "true" | |
| disable-repo-tagging: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.FIX_GITHUB_TOKEN_TO_WRITE_PACKAGES }} |