Skip to content

Commit

Permalink
split test and dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mhzawadi committed Dec 30, 2023
1 parent 870e8c6 commit 522d7eb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/image-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build dev image

on:
workflow_dispatch:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
uses: docker/build-push-action@v3
with:
push: true
tags: mhzawadi/dashbaord:dev
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: ./docker/Dockerfile-dev
11 changes: 7 additions & 4 deletions .github/workflows/image-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
workflow_dispatch:
push:
branches:
- dev
- '[0-9].[0-9]*'

jobs:
build:
build-codeless:
runs-on: ubuntu-latest
steps:
- name: checkout code
Expand All @@ -17,12 +16,16 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Prepare
id: prepare
run: |
echo ::set-output name=version::${{ github.head_ref }}
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
uses: docker/build-push-action@v3
with:
push: true
tags: mhzawadi/dashbaord:dev
tags: "mhzawadi/dashbaord:test-${{ steps.prepare.outputs.version }}"
platforms: linux/amd64,linux/arm64,linux/arm/v7
file: ./docker/Dockerfile-dev
file: ./docker/Dockerfile

0 comments on commit 522d7eb

Please sign in to comment.