Skip to content

Commit

Permalink
Refactor GitHub Actions workflows to use devcontainers/ci for image p…
Browse files Browse the repository at this point in the history
…re-building and streamline container management
  • Loading branch information
jeremiahpslewis committed Dec 18, 2024
1 parent 002ec04 commit 0915b03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 29 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/push-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,9 @@ jobs:
name: Checkout repository
uses: actions/checkout@v4
-
name: Log in to the Container registry
uses: docker/login-action@v3
name: Pre-build dev container image
uses: devcontainers/ci@v0.3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: .devcontainer/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
imageName: ghcr.io/example/example-devcontainer
cacheFrom: ghcr.io/example/example-devcontainer
push: always
14 changes: 5 additions & 9 deletions .github/workflows/quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,12 @@ jobs:
name: Pre-build image and run make ci-build in dev container
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/trr266/esef-website:main
cacheFrom: ghcr.io/trr266/esef-website:main
push: always
runCmd: make ci-build
-
name: Render book to all formats
run: |
export HOME=/root
julia --project=docs setup_julia.jl
quarto render docs --no-cache
push: never
runCmd: |
export HOME=/root
julia --project=docs setup_julia.jl
quarto render docs --no-cache
-
name: Deploy 🚀
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit 0915b03

Please sign in to comment.