diff --git a/.github/workflows/docker-cd-dev.yml b/.github/workflows/docker-cd-dev.yml index 9066821..c87651d 100644 --- a/.github/workflows/docker-cd-dev.yml +++ b/.github/workflows/docker-cd-dev.yml @@ -12,20 +12,30 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - + with: + submodules: true + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Docker meta data + id: docker-meta-data + uses: docker/metadata-action@v4 + with: + images: codexrems/pims + flavor: latest=false + - name: Log in to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push pims-ui Docker image - uses: docker/build-push-action@v4 + - name: Build and push Server Docker image + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 push: true - tags: codexrems/pims:REMSvExperimental + tags: codexrems/pims:experimental + labels: ${{ steps.docker-meta-data.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/docker-cd.yml b/.github/workflows/docker-cd.yml index 0a30ee2..770e920 100644 --- a/.github/workflows/docker-cd.yml +++ b/.github/workflows/docker-cd.yml @@ -1,4 +1,4 @@ -name: Docker Development Image CD +name: Docker Image CD on: push: @@ -12,20 +12,30 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - + with: + submodules: true + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Docker meta data + id: docker-meta-data + uses: docker/metadata-action@v4 + with: + images: codexrems/pims + flavor: latest=false + - name: Log in to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push pims-ui Docker image - uses: docker/build-push-action@v4 + - name: Build and push Server Docker image + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 push: true - tags: codexrems/pims:REMSvCurrent + tags: codexrems/pims:latest + labels: ${{ steps.docker-meta-data.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/docker-ci-dev.yml b/.github/workflows/docker-ci.yml similarity index 66% rename from .github/workflows/docker-ci-dev.yml rename to .github/workflows/docker-ci.yml index ff6294c..5edae1d 100644 --- a/.github/workflows/docker-ci-dev.yml +++ b/.github/workflows/docker-ci.yml @@ -1,10 +1,11 @@ name: Docker Image CI on: - push: - branches: [ dev ] + pull_request: + branches: [ main, dev ] workflow_dispatch: + jobs: docker-ci: runs-on: ubuntu-latest @@ -12,6 +13,8 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - + with: + submodules: true + - name: Test Server Docker image Builds - run: docker build -f Dockerfile.dev . \ No newline at end of file + run: docker build . \ No newline at end of file diff --git a/.github/workflows/docker-tag-cd.yml b/.github/workflows/docker-tag-cd.yml index fe5301d..949d582 100644 --- a/.github/workflows/docker-tag-cd.yml +++ b/.github/workflows/docker-tag-cd.yml @@ -1,41 +1,41 @@ -name: ci - +name: Docker Tagged Image CD on: workflow_dispatch: push: - branches: - - 'master' tags: - - 'v*' - pull_request: - branches: - - 'master' + - '*' jobs: docker: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: codexrems/pims - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + + - name: Checkout Repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Docker meta data + id: docker-meta-data + uses: docker/metadata-action@v4 + with: + images: codexrems/pims + flavor: latest=false + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.docker-meta-data.outputs.tags }} + labels: ${{ steps.docker-meta-data.outputs.labels }}