Skip to content

Commit

Permalink
add docker build workflow (#29)
Browse files Browse the repository at this point in the history
* add docker build workflow
* support multiple platforms
* add caching to build
  • Loading branch information
chicco785 authored Feb 8, 2022
1 parent d737467 commit e5a1834
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: docker

on:
push:
branches:
- '**'
tags:
- '*.*.*'
- '*.*'
pull_request:
branches:
- 'master'

jobs:
auth-management-api:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
orchestracities/auth-management-api
# generate Docker tags based on the following events/attributes
tags: |
type=edge,branch=master
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
file: Dockerfile-api
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
7 changes: 5 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### New features

- Testing and full setup
- Support for orion subscriptions in rego file
- Separate api rules from policy data
- Refactor dependencies

### Bug fixes
Expand All @@ -14,9 +15,11 @@
- Improved documentation
- Fix credits text

### Continous Integration
### Continuous Integration

- Add caching and multiple python version testing
- Add docker build workflow
- Testing and full setup

### Technical debt

Expand Down

0 comments on commit e5a1834

Please sign in to comment.