ci: first attempt docker image
Some checks failed
Test if Server can be built / build-push-server-container (push) Failing after 4s
Test if Server can be built / dependency-track-container (push) Has been skipped
Test if Server can be built / sonarqube (push) Has been cancelled
Test if Server can be built / dependency-track (push) Has been cancelled
Test if Server can be built / build-server (push) Has been cancelled
Some checks failed
Test if Server can be built / build-push-server-container (push) Failing after 4s
Test if Server can be built / dependency-track-container (push) Has been skipped
Test if Server can be built / sonarqube (push) Has been cancelled
Test if Server can be built / dependency-track (push) Has been cancelled
Test if Server can be built / build-server (push) Has been cancelled
This commit is contained in:
parent
151aca2f14
commit
c0653b7750
1 changed files with 59 additions and 0 deletions
|
@ -77,3 +77,62 @@ jobs:
|
||||||
# set projectversion to be the branch name
|
# set projectversion to be the branch name
|
||||||
projectVersion: "${{ github.ref_name }}"
|
projectVersion: "${{ github.ref_name }}"
|
||||||
bomFilename: "${{ github.workspace }}/bom.xml"
|
bomFilename: "${{ github.workspace }}/bom.xml"
|
||||||
|
build-push-server-container:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup dotnet
|
||||||
|
uses: https://github.com/actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0
|
||||||
|
# Add support for more platforms with QEMU (optional)
|
||||||
|
# https://github.com/docker/setup-qemu-action
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: https://github.com/docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: https://github.com/docker/setup-buildx-action@v3.0.0
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: https://github.com/docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: forge.rainote.dev
|
||||||
|
tags: |
|
||||||
|
Wonderking/Continuity:latest
|
||||||
|
Wonderking/Continuity:${{ github.ref_name }}
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./Server/
|
||||||
|
push: true
|
||||||
|
tags: user/repo:latest
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
dependency-track-container:
|
||||||
|
needs: build-push-server-container
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup dotnet
|
||||||
|
uses: https://github.com/actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
dotnet restore
|
||||||
|
echo "::add-path::$HOME/.dotnet/tools"
|
||||||
|
- name: Setup Dependency Track Dependencies
|
||||||
|
run: |
|
||||||
|
dotnet tool install --global CycloneDX
|
||||||
|
- name: Generate SBOM
|
||||||
|
run: |
|
||||||
|
docker sbom --format cyclonedx-json --output bom.json forge.rainote.dev/Wonderking/Continuity:latest
|
||||||
|
- name: Upload SBOM
|
||||||
|
uses: https://github.com/DependencyTrack/gh-upload-sbom@v2.0.1
|
||||||
|
with:
|
||||||
|
apiKey: ${{ secrets.DEPENDENCY_TRACK_API_KEY }}
|
||||||
|
serverHostname: ${{ secrets.DEPENDENCY_TRACK_URL }}
|
||||||
|
projectName: "${{ secrets.DEPENDENCY_TRACK_PROJECT_NAME }}-container"
|
||||||
|
autoCreate: true
|
||||||
|
# set projectversion to be the branch name
|
||||||
|
projectVersion: "${{ github.ref_name }}"
|
||||||
|
bomFilename: "${{ github.workspace }}/bom.xml"
|
||||||
|
|
Loading…
Reference in a new issue