Skip to content

Commit

Permalink
add sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
Alya Sirko committed Mar 2, 2023
1 parent c960b6b commit 7523473
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Image Builder
name: Flutter Build Environment Image

on:
push:
Expand Down Expand Up @@ -35,8 +35,8 @@ jobs:
# Build and push image to the registry
- uses: docker/build-push-action@v3
with:
context: .
context: flutter-build-env/
push: true
tags: "registry.selfprivacy.org:5001/flutter-build-env:latest"
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
42 changes: 42 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: SonarQube Image

on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Trust our self-signed certificate
- run: sudo mkdir -p /etc/docker/certs.d/registry.selfprivacy.org:5001
- run: echo "$REGISTRY_SELFSIGNED_CERT" | sudo tee /etc/docker/certs.d/registry.selfprivacy.org:5001/ca.crt
env:
REGISTRY_SELFSIGNED_CERT: ${{ secrets.REGISTRY_SELFSIGNED_CERT }}

# Setup builder
- uses: docker/setup-buildx-action@v2
with:
config-inline: |
[registry."registry.selfprivacy.org:5001"]
ca=["/etc/docker/certs.d/registry.selfprivacy.org:5001/ca.crt"]
# Login to our container registry
- uses: docker/login-action@v2
with:
registry: registry.selfprivacy.org:5001
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

# Build and push image to the registry
- uses: docker/build-push-action@v3
with:
context: sonarqube/
push: true
tags: "registry.selfprivacy.org:5001/sonarqube:latest"
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 7523473

Please sign in to comment.