Bump the efcore group with 4 updates #283
Workflow file for this run
This file contains hidden or 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
| name: 'CI' | |
| on: | |
| push: | |
| paths: | |
| - src/** | |
| - .github/workflows/ci.yaml | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - src/** | |
| concurrency: | |
| group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| ARCH_PLATFORMS: x64-amd64,arm64-arm64 | |
| jobs: | |
| build: | |
| name: Build, Tests, Publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Get Cache Month | |
| id: cache-month | |
| run: echo "dateYYYYMM=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: src/global.json | |
| cache: true | |
| cache-dependency-path: src/Directory.Packages.props | |
| - name: Build | |
| working-directory: src | |
| run: | | |
| dotnet build -c Release | |
| - name: Run tests | |
| timeout-minutes: 10 | |
| working-directory: src | |
| run: | | |
| dotnet test --no-build -c Release --logger "console;verbosity=normal" --logger "trx;LogFilePrefix=results" -m | |
| - name: Upload test results trx files | |
| uses: actions/upload-artifact@v6 | |
| if: success() || failure() | |
| with: | |
| name: test-results | |
| path: '**/*.trx' | |
| - uses: docker/login-action@v3 | |
| if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publish') }} | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - name: Build, publish image and push manifest | |
| if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publish') }} | |
| run: | | |
| archImages="" | |
| for arch_platform in $(echo $ARCH_PLATFORMS | sed "s/,/ /g"); do | |
| IFS=- read -r arch platform <<< $arch_platform | |
| tag=${{ github.sha }}-$platform | |
| dotnet publish src/EidolonicBot --os linux --arch $arch /t:PublishContainer -c Release /p:ContainerRepository=${{ env.IMAGE_NAME }} /p:ContainerImageTags="$tag" | |
| remoteImage=$REGISTRY/$IMAGE_NAME:$tag | |
| docker tag $IMAGE_NAME:$tag $remoteImage | |
| docker push $remoteImage | |
| archImages+=" ${remoteImage}" | |
| done | |
| docker manifest create $REGISTRY/$IMAGE_NAME:${{ github.sha }} $archImages | |
| docker manifest push $REGISTRY/$IMAGE_NAME:${{ github.sha }} | |
| if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
| docker manifest create $REGISTRY/$IMAGE_NAME:latest $archImages | |
| docker manifest push $REGISTRY/$IMAGE_NAME:latest | |
| fi |