Skip to content

Commit

Permalink
Publish to DockerHub instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
ingokuba committed Mar 19, 2021
1 parent 2ef7aab commit ff27e8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 26 deletions.
45 changes: 19 additions & 26 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,31 @@ on:
types:
- created

env:
IMAGE_NAME: sendinblue-email-provider

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/setup-java@v1
with:
java-version: 11

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

- name: Package maven jar
run: mvn clean package -DskipTests -Djar.name=sendinblue

- name: Build image
run: docker build . --file .github/workflows/Dockerfile --tag $IMAGE_NAME

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=${GITHUB_REF##*/}
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:latest
docker push $IMAGE_ID:$VERSION
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
file: .github/workflows/Dockerfile
tags: intension/sendinblue-email-provider:latest,intension/sendinblue-email-provider:${GITHUB_REF##*/}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Docker](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/docker-publish.yml)

# Keycloak Sendinblue

:e-mail: Keycloak addon to use the Sendinblue API for sending mails

0 comments on commit ff27e8e

Please sign in to comment.