Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea for refactor of workflows #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish features
on:
# push:
# branches: "main"
# paths:
# - src/*/**
# - .github/workflows/publish-features.yml
workflow_dispatch:
concurrency: ${{ github.workflow }}
jobs:
publish-features:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- run: npm install -g @devcontainers/cli
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: devcontainer features publish -r ghcr.io -n ${{ github.repository }} src
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 0 additions & 47 deletions .github/workflows/release.yaml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/test-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test features
on:
push:
branches: "main"
paths:
- src/*/**
- test/*/**
- .github/workflows/test-features.yml
pull_request:
paths:
- src/*/**
- test/*/**
- .github/workflows/test-features.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
list-features:
outputs:
relevant-features: ${{ steps.list-features.outputs.relevant-features }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: list-features
uses: devcontainers-community/list-features@v2
test-feature:
needs: list-features
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.list-features.outputs.relevant-features) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install -g @devcontainers/cli
- name: devcontainer features test -f ${{ matrix.id }}
run: |
if [[ -e test/${{ matrix.id }}/test.sh ]]; then
devcontainer features test -f ${{ matrix.id }}
else
devcontainer features test -f ${{ matrix.id }} --skip-autogenerated
fi
58 changes: 0 additions & 58 deletions .github/workflows/test.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/update-feature-readmes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update feature readmes
on:
push:
branches: "main"
paths:
- .github/workflows/update-feature-readmes.yml
- src/*/devcontainer-feature.json
pull_request:
paths:
- .github/workflows/update-feature-readmes.yml
- src/*/devcontainer-feature.json
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-feature-readmes:
concurrency: ${{ github.ref }}-write
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: devcontainers/action@v1
with:
base-path-to-features: src
generate-docs: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
16 changes: 0 additions & 16 deletions .github/workflows/validate.yml

This file was deleted.