Skip to content

Commit

Permalink
fix: docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsbergPhilip committed Nov 14, 2024
1 parent 9956ac3 commit 09a9035
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,20 @@ jobs:
test-build:
name: Build for dev env
runs-on: ubuntu-latest
services:
docker:
image: docker:20.10.9
options: --privileged
steps:
- run: echo "Ref ${{ github.ref }}"

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build docker image
run: |
docker build -t diamonds2_base:latest -f .docker/dockerfiles/base .
Expand All @@ -64,17 +68,21 @@ jobs:
build-prod:
name: Build for prod env
runs-on: ubuntu-latest
services:
docker:
image: docker:20.10.9
options: --privileged
if: github.ref == 'refs/heads/main'
needs:
- test-backend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build docker image
run: |
docker build -t diamonds2_base:latest -f .docker/dockerfiles/base .
Expand Down

0 comments on commit 09a9035

Please sign in to comment.