Bump docker/login-action from 3 to 4 (#118) #226
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: 'Build and Publish' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ ( github.ref == 'refs/heads/main' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'main' | |
| schedule: | |
| - cron: '19 21 * * TUE' | |
| env: | |
| COMPOSE_BAKE: true | |
| BUILDX_NO_DEFAULT_ATTESTATIONS: true | |
| jobs: | |
| build: | |
| name: 'Build and push docker images' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| fetch-depth: 2 | |
| - name: 'Build tailormap-data images' | |
| run: docker compose -f ./docker-compose.yml build --pull --parallel --compress --no-cache postgis oracle sqlserver | |
| - name: 'Login to b3p.nl' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: docker.b3p.nl | |
| username: ${{ secrets.B3P_DEPLOY_ACTOR }} | |
| password: ${{ secrets.B3P_DEPLOY_TOKEN }} | |
| - name: 'Push tailormap-data database images' | |
| run: docker compose -f ./docker-compose.yml push postgis oracle sqlserver | |
| - name: 'Login to GitHub container registry' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 'Build and push Solr image' | |
| run: | | |
| SOLRVERSION=$(grep "FROM solr" -m1 solr/Dockerfile | cut -f2 -d":"| cut -f1 -d":") | |
| echo "Building Solr version $SOLRVERSION" | |
| docker buildx build --build-arg SOLRVERSION=${SOLRVERSION} --tag ghcr.io/tailormap/solr:${SOLRVERSION} --tag ghcr.io/tailormap/solr:snapshot --push --pull ./solr |