Skip to content

Commit

Permalink
GitHub registry (#314) (#315)
Browse files Browse the repository at this point in the history
* replace docker hub with GitHub registry

* fix yml syntax

* disable PlanQK service integration test

* fix condition, temporarily disable integration tests

* fix empty list

* temporarily remove test job

* reenable integration tests

* replace every mention of Dockerhub
  • Loading branch information
PhilWun authored Mar 24, 2023
1 parent 3ae60bd commit e2185f0
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 77 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/dockerhub.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/dockerhub_stable.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will build the Container and push a corresponding Docker image to the GitHub registry
name: Push docker image to the GitHub registry

on:
workflow_run:
workflows:
- Java CI with Maven
branches: [master]
types:
- completed
tags:
- "v*.*.*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
multi:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
42 changes: 42 additions & 0 deletions .github/workflows/image_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will build the Container and push a corresponding Docker image to the GitHub registry
name: Push stable docker image to the GitHub registry

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

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
multi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
tests:
strategy:
matrix:
test:
test:
- AdaptMultiMyTinyToDoIntegrationTest
- ApacheWebAppIntegrationTest
- ConnectToIntegrationTest
Expand All @@ -44,7 +44,7 @@ jobs:
- MyTinyToDoBPMNIntegrationTest
- MyTinyToDoIntegrationTest
#- MyTinyToDoSqlIntegrationTest
- PlanQKServiceIntegrationTest
#- PlanQKServiceIntegrationTest
- QHAnaTest
runs-on: ubuntu-latest
timeout-minutes: 80
Expand Down

0 comments on commit e2185f0

Please sign in to comment.