Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev to match mains ci-cd workflow #49

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
20 changes: 15 additions & 5 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Development Image CD
name: Docker Image CD

on:
push:
Expand All @@ -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 }}
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Docker Image CI

on:
push:
branches: [ dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:


jobs:
docker-ci:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v3

with:
submodules: true

- name: Test Server Docker image Builds
run: docker build -f Dockerfile.dev .
run: docker build .
59 changes: 31 additions & 28 deletions .github/workflows/docker-tag-cd.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
name: ci

name: Docker Tagged Image CD
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- '*'

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 }}
Loading