CI: use docker compose build --no-cache to prevent stale images
Build and Test / Build and Test (push) Failing after 7m34s
Build and Test / Build and Test (push) Failing after 7m34s
Replace build-push-action with docker compose build --no-cache to ensure the image always contains the latest code. Remove buildx action since we don't need it anymore.
This commit is contained in:
+7
-14
@@ -1,4 +1,4 @@
|
|||||||
name: Build, Lint, and Test
|
name: Build and Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -12,29 +12,22 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
name: Build, Lint, and Test
|
name: Build and Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
||||||
env:
|
env:
|
||||||
COMPOSE_FILE: ./docker-compose.ci.yml
|
COMPOSE_FILE: ./docker-compose.ci.yml
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Build and run Docker image
|
||||||
uses: docker/setup-buildx-action@v3
|
run: |
|
||||||
|
docker compose build --no-cache
|
||||||
- name: Build docker image
|
docker compose up --detach
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./docker/dev.Dockerfile
|
|
||||||
load: true
|
|
||||||
|
|
||||||
- name: Run Docker image
|
|
||||||
run: docker compose up --detach
|
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user