chore(deps): update alpine docker tag to v3.23 #279
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: C/C++ CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| duplicates: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run Duplo Analyser | |
| uses: dlidstrom/[email protected] | |
| with: | |
| directory: src | |
| include-pattern: \.cpp$ | |
| version: v2.0.1 | |
| bump-tag-dry: | |
| runs-on: ubuntu-latest | |
| needs: [duplicates] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Get next version | |
| id: tag | |
| uses: anothrNick/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| WITH_V: true | |
| DEFAULT_BUMP: patch | |
| DRY_RUN: true | |
| - name: create tag file | |
| run: | | |
| echo ${{ steps.tag.outputs.new_tag }} > tag.txt | |
| - name: upload new tag artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: tag-txt | |
| path: tag.txt | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| needs: [bump-tag-dry] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: tag-txt | |
| path: uploads | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: setup | |
| run: | | |
| npm install -g bats | |
| - name: build | |
| run: | | |
| export DUPLO_VERSION=`cat ./uploads/tag.txt` | |
| mkdir -p build | |
| pushd build | |
| cmake .. -DDUPLO_VERSION=\"$DUPLO_VERSION\" -DCMAKE_BUILD_TYPE=Release | |
| make | |
| popd | |
| zip --junk-paths duplo-linux build/duplo | |
| - name: test | |
| run: bats --recursive tests | |
| - name: upload linux artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: linux-build | |
| path: duplo-linux.zip | |
| build-macos: | |
| runs-on: macos-latest | |
| needs: [bump-tag-dry] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: tag-txt | |
| path: uploads | |
| - name: build | |
| run: | | |
| brew install bats-core | |
| export DUPLO_VERSION=`cat ./uploads/tag.txt` | |
| mkdir -p build | |
| pushd build | |
| cmake .. -DDUPLO_VERSION=\"$DUPLO_VERSION\" -DCMAKE_BUILD_TYPE=Release | |
| make | |
| popd | |
| zip --junk-paths duplo-macos build/duplo | |
| - name: upload macos artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: macos-build | |
| path: duplo-macos.zip | |
| build-windows: | |
| runs-on: windows-latest | |
| needs: [bump-tag-dry] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: tag-txt | |
| path: uploads | |
| - name: build | |
| run: | | |
| $duploVersion = Get-Content .\uploads\tag.txt | |
| mkdir build | Out-Null | |
| pushd build | |
| cmake .. "-DDUPLO_VERSION=`"$duploVersion`"" -G "Visual Studio 17 2022" -A x64 | |
| cmake --build . --config Release | |
| popd | |
| Compress-Archive -Path build\Release\duplo.exe -DestinationPath duplo-windows.zip | |
| - name: upload windows artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: windows-build | |
| path: duplo-windows.zip | |
| # push-docker-image: | |
| # runs-on: ubuntu-latest | |
| # needs: [bump-tag-dry] | |
| # steps: | |
| # - name: download artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: tag-txt | |
| # path: uploads | |
| # | |
| # - name: set version | |
| # id: version | |
| # run: | | |
| # DUPLO_VERSION=$(cat ./uploads/tag.txt) | |
| # echo $DUPLO_VERSION | |
| # echo "DUPLO_VERSION=$DUPLO_VERSION" >> $GITHUB_ENV | |
| # echo "DUPLO_VERSION=$DUPLO_VERSION" >> $GITHUB_OUTPUT | |
| # | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: '0' | |
| # | |
| # - name: Set up Docker Buildx | |
| # uses: docker/setup-buildx-action@v3 | |
| # | |
| # - name: Login to Docker Hub | |
| # if: github.event_name != 'pull_request' | |
| # uses: docker/login-action@v3 | |
| # with: | |
| # username: ${{ secrets.DOCKER_USERNAME }} | |
| # password: ${{ secrets.DOCKER_PASSWORD }} | |
| # | |
| # - name: Docker build | |
| # if: github.event_name == 'pull_request' | |
| # uses: docker/build-push-action@v5 | |
| # with: | |
| # push: false | |
| # tags: "dlidstrom/duplo:${{ steps.version.outputs.DUPLO_VERSION }}" | |
| # build-args: | | |
| # "DUPLO_VERSION=${{ steps.version.outputs.DUPLO_VERSION }}" | |
| # | |
| # - name: Docker build and push | |
| # if: github.event_name != 'pull_request' | |
| # uses: docker/build-push-action@v5 | |
| # with: | |
| # push: true | |
| # tags: "dlidstrom/duplo:latest,dlidstrom/duplo:${{ steps.version.outputs.DUPLO_VERSION }}" | |
| # build-args: | | |
| # "DUPLO_VERSION=${{ steps.version.outputs.DUPLO_VERSION }}" | |
| upload-release: | |
| if: success() | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-macos, build-windows] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: '0' | |
| - name: Bump version and push tag | |
| id: tag | |
| uses: anothrNick/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| WITH_V: true | |
| DEFAULT_BUMP: patch | |
| - name: create release | |
| id: create_release | |
| uses: actions/create-release@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.tag.outputs.tag }} | |
| release_name: Release ${{ steps.tag.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| - name: download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: uploads | |
| - name: upload macos | |
| id: upload-macos | |
| uses: actions/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./uploads/macos-build/duplo-macos.zip | |
| asset_name: duplo-macos.zip | |
| asset_content_type: application/zip | |
| - name: upload linux | |
| id: upload-linux | |
| uses: actions/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./uploads/linux-build/duplo-linux.zip | |
| asset_name: duplo-linux.zip | |
| asset_content_type: application/zip | |
| - name: upload windows | |
| id: upload-windows | |
| uses: actions/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./uploads/windows-build/duplo-windows.zip | |
| asset_name: duplo-windows.zip | |
| asset_content_type: application/zip |