Automatic dependencies updates: Separate major from minor and patch dependencies updates. Gate major upgrades #18421
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: Dev Docker Images | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| pull_request_target: | |
| branches: [main] | |
| jobs: | |
| docker-build: | |
| if: | | |
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || | |
| (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) || | |
| github.event_name == 'push' | |
| environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'external-contributor' || null }} | |
| strategy: | |
| matrix: | |
| # ubuntu-latest leverages larger GH runner pool & completes in ~30s instead of ~3m | |
| runner: [ubuntu-latest] | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }} | |
| - name: generate or hydrate protos | |
| uses: ./.github/actions/genprotos | |
| - uses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{github.actor}} | |
| password: ${{secrets.GITHUB_TOKEN}} | |
| - name: Set Short Commit Hash | |
| id: vars | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Build (optionally publish) PeerDB Images | |
| uses: depot/bake-action@1d58c2668346981089b088b7ef36755b206b20e9 # v1 | |
| with: | |
| token: ${{ secrets.DEPOT_TOKEN }} | |
| files: ./docker-bake.hcl | |
| push: ${{ github.ref == 'refs/heads/main' }} | |
| env: | |
| SHA_SHORT: dev-${{ steps.vars.outputs.sha_short }} | |
| TAG: latest-dev |