Skip to content

update devcontainer to debian bookworm to avoid filling more disk space #38

update devcontainer to debian bookworm to avoid filling more disk space

update devcontainer to debian bookworm to avoid filling more disk space #38

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Build and test with Docker
on:
push:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
test-and-build:
name: test and build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c
- name: Unit tests
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
target: test
push: false
cache-from: type=gha,scope=${{ github.ref_name}}-test
cache-to: type=gha,mode=max,scope=${{ github.ref_name}}-test
- name: Build Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
target: production
push: false
cache-from: type=gha,scope=${{ github.ref_name}}-prod
cache-to: type=gha,mode=max,scope=${{ github.ref_name}}-prod