Skip to content

Commit

Permalink
Merge branch 'feature/issue#21' into issue#23
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodamato committed Feb 23, 2021
2 parents 41da459 + 1d44776 commit 267135d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-image-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build-image-docker

on:
push:
tags:
- "*.*.*"

jobs:
build-image-docker:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: globokaas/enforcement

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 267135d

Please sign in to comment.