-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(latex): revamp LaTeX devcontainer, setup docker bake Signed-off-by: John Muchovej <[email protected]> * test(latex): add tests for latex devcontainer Signed-off-by: John Muchovej <[email protected]> * feat(latex): update devcontainer template to prompt image selection Signed-off-by: John Muchovej <[email protected]> --------- Signed-off-by: John Muchovej <[email protected]> Co-authored-by: John Muchovej <[email protected]>
- Loading branch information
Showing
13 changed files
with
455 additions
and
543 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Build and publish LaTeX devcontainer to ghcr.io" | ||
|
||
on: | ||
push: | ||
paths: | ||
- "templates/src/latex/Dockerfile" | ||
- "templates/src/latex/docker-bake.hcl" | ||
- ".github/workflows/build-latex-devcontainer.yaml" | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 2 1 4 *" # historically, TeXLive has been published around March | ||
|
||
jobs: | ||
build-push-latex: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Setup QEMU" | ||
uses: "docker/setup-qemu-action@v3" | ||
|
||
- name: "Setup Docker `buildx`" | ||
uses: "docker/setup-buildx-action@v3" | ||
|
||
- name: "Login to `ghcr.io`" | ||
uses: "docker/login-action@v3" | ||
with: | ||
registry: "ghcr.io" | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- id: bake | ||
uses: docker/bake-action@v5 | ||
with: | ||
workdir: "./templates/src/latex" | ||
push: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
name: "Release Dev Container Templates & Generate Documentation" | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Publish Templates" | ||
uses: devcontainers/action@v1 | ||
with: | ||
publish-templates: "true" | ||
base-path-to-templates: "./templates/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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "CI - Test Templates" | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
detect-changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
templates: ${{ steps.filter.outputs.changes }} | ||
steps: | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
latex: ./templates/**/latex/** | ||
test: | ||
needs: [detect-changes] | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
templates: ${{ fromJSON(needs.detect-changes.outputs.templates) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Smoke test for '${{ matrix.templates }}' | ||
id: smoke_test | ||
uses: ./.github/actions/smoke-test | ||
with: | ||
template: "${{ matrix.templates }}" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.