Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
bd53914cc3 | |||
2f3f02ae5a | |||
d3575ea71a | |||
eaedf50f1c | |||
626d91d9c0 | |||
894c848c24 | |||
8048dc7a61 |
4 changed files with 58 additions and 6 deletions
23
.forgejo/workflows/docker-master.yaml
Normal file
23
.forgejo/workflows/docker-master.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
jobs:
|
||||||
|
docker-master:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: git.van-hemmen.com/actions/kaniko:25.21.1
|
||||||
|
steps:
|
||||||
|
- name: Build & push with Kaniko
|
||||||
|
run: /bin/build.sh
|
||||||
|
env:
|
||||||
|
# --- mandatory --------------------------------------------------------
|
||||||
|
KANIKO_CONTEXT: git://git.van-hemmen.com/GuillaumeHemmen/sonar-scanner.git
|
||||||
|
GIT_REF_NAME: ${{ github.ref_name }}
|
||||||
|
GIT_USERNAME: ${{ secrets.docker_username }}
|
||||||
|
GIT_PASSWORD: ${{ secrets.access_token }}
|
||||||
|
|
||||||
|
# --- optional (only needed when you plan to push) ---------------------
|
||||||
|
REGISTRY_USER: ${{ secrets.docker_username }}
|
||||||
|
REGISTRY_PASS: ${{ secrets.access_token }}
|
||||||
|
KANIKO_DESTINATION: git.van-hemmen.com/guillaumehemmen/sonar-scanner:${GITHUB_SHA},git.van-hemmen.com/guillaumehemmen/sonar-scanner:latest
|
23
.forgejo/workflows/docker-tag.yaml
Normal file
23
.forgejo/workflows/docker-tag.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
jobs:
|
||||||
|
docker-tag:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: git.van-hemmen.com/actions/kaniko:25.21.1
|
||||||
|
steps:
|
||||||
|
- name: Build & push with Kaniko
|
||||||
|
run: /bin/build.sh
|
||||||
|
env:
|
||||||
|
# --- mandatory --------------------------------------------------------
|
||||||
|
KANIKO_CONTEXT: git://git.van-hemmen.com/GuillaumeHemmen/sonar-scanner.git
|
||||||
|
GIT_REF_NAME: ${{ github.ref_name }}
|
||||||
|
GIT_USERNAME: ${{ secrets.docker_username }}
|
||||||
|
GIT_PASSWORD: ${{ secrets.access_token }}
|
||||||
|
|
||||||
|
# --- optional (only needed when you plan to push) ---------------------
|
||||||
|
REGISTRY_USER: ${{ secrets.docker_username }}
|
||||||
|
REGISTRY_PASS: ${{ secrets.access_token }}
|
||||||
|
KANIKO_DESTINATION: git.van-hemmen.com/guillaumehemmen/sonar-scanner:${GITHUB_REF_NAME},git.van-hemmen.com/guillaumehemmen/sonar-scanner:latest
|
|
@ -1,10 +1,14 @@
|
||||||
steps:
|
steps:
|
||||||
|
env-info:
|
||||||
|
image: ubuntu:latest
|
||||||
|
commands:
|
||||||
|
- printenv
|
||||||
|
|
||||||
docker-master:
|
docker-master:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
repo: git.van-hemmen.com/guillaumehemmen/sonar-scanner
|
repo: git.van-hemmen.com/guillaumehemmen/sonar-scanner
|
||||||
tags: latest,${CI_COMMIT}
|
tags: latest,${CI_COMMIT_SHA}
|
||||||
registry: git.van-hemmen.com
|
registry: git.van-hemmen.com
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -13,13 +17,14 @@ steps:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- manual
|
||||||
branch: 'master'
|
branch: 'master'
|
||||||
|
|
||||||
docker-tag:
|
docker-tag:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
repo: git.van-hemmen.com/guillaumehemmen/sonar-scanner
|
repo: git.van-hemmen.com/guillaumehemmen/sonar-scanner
|
||||||
tags: latest,${CI_TAG}
|
tags: latest,${CI_COMMIT_TAG}
|
||||||
registry: git.van-hemmen.com
|
registry: git.van-hemmen.com
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FROM node:18
|
FROM node:22
|
||||||
|
|
||||||
LABEL maintainer="guillaume@van-hemmen.com"
|
LABEL maintainer="guillaume@van-hemmen.com"
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y install wget unzip && \
|
apt-get -y install wget unzip && \
|
||||||
cd /root/ && \
|
cd /root/ && \
|
||||||
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.8.1.3023-linux.zip && \
|
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-7.1.0.4889-linux-x64.zip && \
|
||||||
unzip sonar-scanner-cli-4.8.1.3023-linux.zip && \
|
unzip sonar-scanner-cli-7.1.0.4889-linux-x64.zip && \
|
||||||
ln -sf /root/sonar-scanner-4.8.1.3023-linux/bin/sonar-scanner /usr/local/bin/sonar-scanner
|
ln -sf /root/sonar-scanner-7.1.0.4889-linux-x64/bin/sonar-scanner /usr/local/bin/sonar-scanner && \
|
||||||
|
/usr/local/bin/sonar-scanner --version
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue