diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c8aff91..ebcfbe18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,10 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Enable vcpkg cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: c:\vcpkg\installed key: windows-vcpkg-x64-0 # Increase the number whenever dependencies are modified @@ -30,7 +30,7 @@ jobs: - name: Build tilemaker run: | - mkdir ${{ github.workspace }}\build + mkdir ${{ github.workspace }}\build cd ${{ github.workspace }}\build && cmake -DTILEMAKER_BUILD_STATIC=ON -DVCPKG_TARGET_TRIPLET="x64-windows-static-md" -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" .. cd ${{ github.workspace }}\build && cmake --build . --config RelWithDebInfo @@ -49,9 +49,9 @@ jobs: ${{ github.workspace }}\build\RelWithDebInfo\tilemaker.exe ${{ github.workspace }}\build\RelWithDebInfo\*.pdb - unix-build: - strategy: - matrix: + unix-build: + strategy: + matrix: include: - os: ubuntu-22.04 triplet: x64-linux @@ -62,10 +62,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Enable vcpkg cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ matrix.path }} key: vcpkg-${{ matrix.triplet }}-0 # Increase the number whenever dependencies are modified @@ -80,7 +80,7 @@ jobs: mkdir build cd build cmake -DTILEMAKER_BUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DCMAKE_CXX_COMPILER=g++ .. - cmake --build . + cmake --build . strip tilemaker - name: Build openmaptiles-compatible mbtiles files of Liechtenstein @@ -109,7 +109,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Linux dependencies if: ${{ matrix.os == 'ubuntu-22.04' }} @@ -140,7 +140,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download PBF file run: curl http://download.geofabrik.de/europe/${AREA}-latest.osm.pbf -o ${AREA}.osm.pbf @@ -148,7 +148,7 @@ jobs: - name: Build openmaptiles-compatible mbtiles files of given area uses: ./ with: - input: ${{ env.AREA }}.osm.pbf + input: ${{ env.AREA }}.osm.pbf output: ${{ env.AREA }}.mbtiles docker-build: @@ -163,7 +163,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 @@ -174,9 +174,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value={{date 'YYYY-MM-DDTHH-mm'}} + type=raw,value=latest - name: Build Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc @@ -186,6 +189,7 @@ jobs: push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc if: ${{ github.ref == 'refs/heads/master'}}