Skip to content

Commit

Permalink
docker ci-cd updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smalho01 committed Oct 5, 2023
1 parent 9bc02cd commit f830d73
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 47 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/docker-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ jobs:
docker-cd:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
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/rems-smart-on-fhir
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 Server Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: codexrems/rems-smart-on-fhir:REMSvExperimental
tags: codexrems/rems-smart-on-fhir:experimental
labels: ${{ steps.docker-meta-data.outputs.labels }}
21 changes: 15 additions & 6 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ jobs:
docker-cd:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
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/rems-smart-on-fhir
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 Server Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: codexrems/rems-smart-on-fhir:REMSvCurrent
tags: codexrems/rems-smart-on-fhir:latest
labels: ${{ steps.docker-meta-data.outputs.labels }}
6 changes: 3 additions & 3 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:

- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

- name: Test Server Docker image Builds
run: docker build .
run: docker build .
64 changes: 32 additions & 32 deletions .github/workflows/docker-tag-cd.yml
Original file line number Diff line number Diff line change
@@ -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/rems-smart-on-fhir
-
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/rems-smart-on-fhir
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 }}

0 comments on commit f830d73

Please sign in to comment.