Skip to content

Update docker/pipeline to net10 #293

Update docker/pipeline to net10

Update docker/pipeline to net10 #293

Workflow file for this run

name: Continuous integration
on:
push:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
architecture: x64
- name: Install SonarCloud dotnet
if: ${{ false }}
run: dotnet tool install --global dotnet-sonarscanner
- name: Start SonarCloud analysis
if: ${{ false }}
run: dotnet sonarscanner begin -k:FAForever_faf-qai -d:sonar.host.url="https://sonarcloud.io" -o:faforever -d:sonar.login=${{secrets.SONAR_TOKEN}} -d:sonar.branch.name=${GITHUB_REF##*/} -v:${GITHUB_RUN_NUMBER} -d:sonar.cs.opencover.reportsPaths=./testresults/*/coverage.opencover.xml
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal --collect:"XPlat Code Coverage" --results-directory:./testresults -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: End SonarCloud analysis
if: ${{ false }}
run: dotnet sonarscanner end -d:sonar.login=${{secrets.SONAR_TOKEN}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
id: meta
uses: docker/metadata-action@v5
with:
images: faforever/faf-qai
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Build and push Docker images
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}