-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from H2-invent/feature/docker-pipeline
Create task-docker.yml
- Loading branch information
Showing
9 changed files
with
217 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,14 @@ on: | |
push: | ||
branches: | ||
- development | ||
- feature/docker* | ||
|
||
jobs: | ||
artifact: | ||
uses: h2-invent/open-datenschutzcenter/.github/workflows/task-artifact.yml@master | ||
|
||
create_dev_release: | ||
needs: | ||
- artifact | ||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -31,31 +28,28 @@ jobs: | |
change_path: . | ||
version_format: "${major}.${minor}.${patch}-${increment}" | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact_${{github.run_number}} | ||
|
||
- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact | ||
|
||
- name: Set laF_version in .env | ||
run: | | ||
sed -i 's/^laF_version=.*/laF_version=${{ steps.version.outputs.version }}/' .env | ||
artifact: | ||
uses: ./.github/workflows/task-artifact.yml | ||
|
||
- name: Archive Release for application | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: 'application.zip' | ||
exclusions: '*.git* *.github* /*node_modules/* /*var/* .editorconfig' | ||
directory: artifact | ||
prerelease: | ||
needs: | ||
- artifact | ||
- version | ||
uses: ./.github/workflows/task-release.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
prerelease: true | ||
|
||
- name: Create new Release with semantic-version tag | ||
uses: ncipollo/release-action@v1 | ||
id: create_release | ||
with: | ||
prerelease: true | ||
name: DEV Release ${{ steps.version.outputs.version }} | ||
tag: ${{ steps.version.outputs.version }} | ||
artifacts: artifact/application.zip | ||
artifactContentType: application/zip | ||
bodyFile: RELEASE_NOTE.md | ||
docker: | ||
needs: | ||
- version | ||
uses: ./.github/workflows/task-docker.yml | ||
with: | ||
reponame: 'git.h2-invent.com/datenschutzcenter/application' | ||
version: ${{ needs.version.outputs.version }} | ||
dockerfile_path: './Dockerfile' | ||
directory: '.' | ||
tags: 'git.h2-invent.com/datenschutzcenter/application:${{ needs.version.outputs.version }},git.h2-invent.com/datenschutzcenter/application:development' | ||
secrets: | ||
docker_password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
docker_username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,11 @@ on: | |
- master | ||
|
||
jobs: | ||
artifact: | ||
uses: h2-invent/open-datenschutzcenter/.github/workflows/task-artifact.yml@master | ||
|
||
create_release: | ||
needs: | ||
- artifact | ||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -32,31 +28,28 @@ jobs: | |
change_path: . | ||
version_format: "${major}.${minor}.${patch}" | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact_${{github.run_number}} | ||
|
||
- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact | ||
|
||
- name: Set laF_version in .env | ||
run: | | ||
sed -i 's/^laF_version=.*/laF_version=${{ steps.version.outputs.version }}/' .env | ||
artifact: | ||
uses: ./.github/workflows/task-artifact.yml | ||
|
||
- name: Archive Release for application | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: 'application.zip' | ||
exclusions: '*.git* *.github* /*node_modules/* /*nodejs/* /*var/* .editorconfig' | ||
directory: artifact | ||
release: | ||
needs: | ||
- artifact | ||
- version | ||
uses: ./.github/workflows/task-release.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
prerelease: false | ||
|
||
- name: Create new Release with semantic-version tag | ||
uses: ncipollo/release-action@v1 | ||
id: create_release | ||
with: | ||
prerelease: false | ||
name: Release ${{ steps.version.outputs.version }} | ||
tag: ${{ steps.version.outputs.version }} | ||
artifacts: artifact/application.zip | ||
artifactContentType: application/zip | ||
bodyFile: RELEASE_NOTE.md | ||
docker: | ||
needs: | ||
- version | ||
uses: ./.github/workflows/task-docker.yml | ||
with: | ||
reponame: 'git.h2-invent.com/datenschutzcenter/application' | ||
version: ${{ needs.version.outputs.version }} | ||
dockerfile_path: './Dockerfile' | ||
directory: '.' | ||
tags: 'git.h2-invent.com/datenschutzcenter/application:${{ needs.version.outputs.version }},git.h2-invent.com/datenschutzcenter/application:latest' | ||
secrets: | ||
docker_password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
docker_username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Run Code Analysis on push | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
|
||
artifact: | ||
uses: ./.github/workflows/task-test.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
reponame: | ||
description: 'the image name of the docker hub image' | ||
default: 'h2invent/jitsi-admin-main' | ||
required: true | ||
type: string | ||
directory: | ||
description: 'the dir of the Dockerfile image' | ||
default: '.' | ||
required: true | ||
type: string | ||
dockerfile_path: | ||
description: 'the name of the Dockerfile image' | ||
default: './Dockerfile' | ||
required: true | ||
type: string | ||
version: | ||
description: 'the version/tag of the Dockerfile image' | ||
required: true | ||
type: string | ||
tags: | ||
description: 'the tags of the Dockerfile image' | ||
required: true | ||
type: string | ||
secrets: | ||
docker_username: | ||
required: true | ||
docker_password: | ||
required: true | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Build and Push Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: git.h2-invent.com | ||
username: ${{ secrets.docker_username }} | ||
password: ${{ secrets.docker_password }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ${{ inputs.directory }} | ||
file: ${{ inputs.dockerfile_path }} | ||
push: true | ||
build-args: VERSION=${{ inputs.version }} | ||
tags: ${{ inputs.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Publish new Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'release version' | ||
default: true | ||
type: string | ||
prerelease: | ||
description: 'publish releases as preprelease' | ||
default: true | ||
type: boolean | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact_${{github.run_number}} | ||
|
||
- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact | ||
|
||
- name: Set laF_version in .env | ||
run: | | ||
sed -i 's/^laF_version=.*/laF_version=${{ inputs.version }}/' .env | ||
- name: Archive Release for application | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: 'application.zip' | ||
exclusions: '*.git* *.github* /*node_modules/* /*var/* .editorconfig' | ||
directory: artifact | ||
|
||
- name: Create new Release with semantic-version tag | ||
uses: ncipollo/release-action@v1 | ||
id: create_release | ||
with: | ||
prerelease: ${{ inputs.prerelease }} | ||
name: DEV Release ${{ inputs.version }} | ||
tag: ${{ inputs.version }} | ||
artifacts: artifact/application.zip | ||
artifactContentType: application/zip | ||
bodyFile: RELEASE_NOTE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Code Analysis | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ vars.PHP_VERSION }} | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
composer-options: --prefer-dist | ||
|
||
- name: Run script | ||
run: vendor/bin/phpstan analyse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Run TODO to Issue" | ||
|
||
on: [ "push" ] | ||
|
||
jobs: | ||
create_issues: | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "TODO to Issue" | ||
uses: alstr/todo-to-issue-action@v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
# Release 4.0.0 | ||
# Release 4.0.1 | ||
|
||
> Dieses Release wird als Docker Image auf git.h2-invent.com/datenschutzcenter/application öffentlich bereitgestellt. | ||
> | ||
> Dieses Release wird als ZIP Artifact mit Webpack CSS und JS Files und Composer Vendor Files auf Github für eine manuelle Installation auf einem Webserver bereitgestellt. | ||
## Neue Funktionen und Verbesserungen | ||
* In den TOM Formularen können jetzt die technischen und organisatorischen Maßnahmen mit einem WYSIWYG Editor beschrieben werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/217) | ||
* Der neue Assistent unterstützt beim Erstellen von Verarbeitungen und allen notwendigen Datensätzen. Dieser Assistent erleichtert die Erfassung von neuen Verarbeitungen. (https://github.com/H2-invent/open-datenschutzcenter/pull/204) | ||
* Ab sofort können Datenschutzelemente von einem Team in Kinderteams vererbt werden. (https://github.com/H2-invent/open-datenschutzcenter/pull/205) | ||
* Add new Dockerfile for the ODC | ||
* New Github Action with Docker build | ||
|
||
## Bug fixes | ||
|
||
|
||
## Update Anleitung | ||
* Die Anleitung zum Installieren des ODCs mit hilfe Docker Compose wurde angepasst (https://github.com/H2-invent/open-datenschutzcenter/wiki/Get-Started) | ||
* Docker Images Updated with Github Action |