V2.8.1: updates JNet and many other packages #22
Workflow file for this run
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 is a basic workflow to help you get started with Actions | |
name: CI_DOCKER | |
# Controls when the action will run. Triggers the workflow on release published or release edited request | |
# events but only for the master branch | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build_container_knet: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
packages: write | |
contents: read | |
attestations: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
submodules: 'true' | |
- name: Pre compile | |
run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" /p:NoWarn="0108%3B1030%3B0618" src/net/KNet/KNet.csproj | |
env: | |
GITHUB_SIMPLIFIED_GENERATION: true | |
- name: Set up Apache Maven Central | |
uses: actions/setup-java@v4 | |
with: # running setup-java again overwrites the settings.xml | |
distribution: temurin | |
java-version: 11 | |
cache: 'maven' | |
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | |
server-username: MAVEN_USERNAME # env variable for username in deploy | |
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
- name: Create Jars | |
run: mvn --file ./src/jvm/knet/pom.xml --no-transfer-progress package | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Container Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.MASES_DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.MASES_DOCKER_HUB_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
masesgroup/knet | |
ghcr.io/${{ github.repository_owner }}/knet | |
- name: Build and push | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
file: ./src/container/DockerfileKNet.linux | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
provenance: true | |
sbom: true | |
- name: Attest Docker Hub | |
uses: actions/attest-build-provenance@v1 | |
id: attest1 | |
with: | |
subject-name: index.docker.io/masesgroup/knet | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true | |
- name: Attest GitHub | |
uses: actions/attest-build-provenance@v1 | |
id: attest2 | |
with: | |
subject-name: ghcr.io/${{ github.repository_owner }}/knet | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |