diff --git a/.devcontainer.json b/.devcontainer.json deleted file mode 100644 index d26a5bc20..000000000 --- a/.devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", - "customizations": { - "vscode": { - "settings": { - "json.schemas": [ - { - "fileMatch": [ - "*/devcontainer-feature.json" - ], - "url": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainerFeature.schema.json" - } - ] - }, - "extensions": [ - "mads-hartmann.bash-ide-vscode" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {} - }, - "remoteUser": "node", - "updateContentCommand": "npm install -g @devcontainers/cli" -} diff --git a/.github/workflows/publish-features.yml b/.github/workflows/publish-features.yml new file mode 100644 index 000000000..11410dd30 --- /dev/null +++ b/.github/workflows/publish-features.yml @@ -0,0 +1,25 @@ +name: Publish features +on: + push: + branches: "main" + paths-ignore: + - .gitignore + - LICENSE + - README.md + - .gitattributes + workflow_dispatch: +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true +jobs: + publish-features: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v3 + - run: npm install -g @devcontainers/cli + - run: devcontainer features --help + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 9ba1e6242..000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Release dev container features & Generate Documentation" -on: - workflow_dispatch: - -jobs: - deploy: - if: ${{ github.ref == 'refs/heads/main' }} - 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.GITHUB_TOKEN }} - - - name: Create PR for Documentation - id: push_image_info - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -e - echo "Start." - # Configure git and Push updates - git config --global user.email github-actions[bot]@users.noreply.github.com - git config --global user.name github-actions[bot] - git config pull.rebase false - branch=automated-documentation-update-$GITHUB_RUN_ID - git checkout -b $branch - message='Automated documentation update' - # Add / update and commit - git add */**/README.md - git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true - # Push - if [ "$NO_UPDATES" != "true" ] ; then - git push origin "$branch" - gh pr create --title "$message" --body "$message" - fi diff --git a/.github/workflows/test-relevant-features.yml b/.github/workflows/test-relevant-features.yml new file mode 100644 index 000000000..019eb37c4 --- /dev/null +++ b/.github/workflows/test-relevant-features.yml @@ -0,0 +1,39 @@ +name: Test relevant features +on: + push: + branches: "main" + paths-ignore: + - .gitignore + - LICENSE + - README.md + - .gitattributes + pull_request: + paths-ignore: + - .gitignore + - LICENSE + - README.md + - .gitattributes +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + list-features: + outputs: + features: ${{ steps.list-features-outputs.features }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - id: list-features + uses: devcontainers-community/list-features@v1 + with: + relevant-only: true + test-feature: + needs: list-features + strategy: + fail-fast: false + matrix: ${{ toJSON(needs.list-features.outputs.features) }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: npm install -g @devcontainers/cli + - run: devcontainer features test -f ${{ matrix.id }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 9e5f9bf79..000000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: "CI - Test Features" -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - test-autogenerated: - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - features: - - color - - hello - baseImage: - - debian:latest - - ubuntu:latest - - mcr.microsoft.com/devcontainers/base:ubuntu - steps: - - uses: actions/checkout@v3 - - - name: "Install latest devcontainer CLI" - run: npm install -g @devcontainers/cli - - - name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'" - run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . - - test-scenarios: - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - features: - - color - - hello - steps: - - uses: actions/checkout@v3 - - - name: "Install latest devcontainer CLI" - run: npm install -g @devcontainers/cli - - - name: "Generating tests for '${{ matrix.features }}' scenarios" - run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated . - - test-global: - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v3 - - - name: "Install latest devcontainer CLI" - run: npm install -g @devcontainers/cli - - - name: "Testing global scenarios" - run: devcontainer features test --global-scenarios-only . diff --git a/.github/workflows/update-feature-readmes.yml b/.github/workflows/update-feature-readmes.yml new file mode 100644 index 000000000..bda61ecfd --- /dev/null +++ b/.github/workflows/update-feature-readmes.yml @@ -0,0 +1,23 @@ +name: Publish features +on: + push: + branches: "main" + paths-ignore: + - .gitignore + - LICENSE + - README.md + - .gitattributes + workflow_dispatch: +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true +jobs: + publish-features: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v3 + - uses: devcontainers-community/update-feature-readmes@v1 + - uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml deleted file mode 100644 index 5dcc21b76..000000000 --- a/.github/workflows/validate.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Validate devcontainer-feature.json files" -on: - workflow_dispatch: - pull_request: - -jobs: - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: "Validate devcontainer-feature.json files" - uses: devcontainers/action@v1 - with: - validate-only: "true" - base-path-to-features: "./src"