Remove devcontainer-ci.json and update lint-test-build workflow to build Docker image directly

This commit is contained in:
Luis Eduardo
2025-02-03 04:17:15 +00:00
parent be2422ac75
commit 53380c9dcf
2 changed files with 7 additions and 26 deletions

View File

@@ -1,11 +0,0 @@
// For the moment --platform is not supported in devcontainers/ci when
// using docker compose, so in this devcontainer config file we are
// using the Dockerfile directly to run actions in CI.
//
// https://github.com/devcontainers/cli/issues/404
{
"build": {
"context": "../",
"dockerfile": "../docker/Dockerfile.dev"
}
}

View File

@@ -32,25 +32,17 @@ jobs:
with:
use: true
- name: Install Skopeo # For some reason required by devcontainers/ci
run: |
sudo apt-get update
sudo apt-get install -y skopeo
- name: Prepare devcontainer-ci.json
run: |
rm -f .devcontainer/devcontainer.json
mv .devcontainer/devcontainer-ci.json .devcontainer/devcontainer.json
- name: Build the Docker image
run: docker buildx build --platform ${{ matrix.vars.platform }} -t pgbackweb:latest .
- name: Run lint, test, and build
uses: devcontainers/ci@v0.3
with:
push: never
platform: ${{ matrix.vars.platform }}
runCmd: >
run: >
docker run --rm -v $PWD:/app -w /app pgbackweb:latest /bin/bash -c "\
npm install && \
go mod download && \
task fixperms && \
task check-deps && \
task lint-only && \
task test-only && \
task build
task build \
"