fix: don't push Docker images on pull requests #102
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: Test PostgreSQL Upgrade Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| test-builds: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target_version: ["16", "17"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Task | |
| run: | | |
| sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin | |
| - name: Build image for target version ${{ matrix.target_version }} | |
| run: | | |
| task build:build-${{ matrix.target_version }} | |
| - name: Test upgrade to ${{ matrix.target_version }} | |
| env: | |
| GITHUB_ACTIONS: "true" | |
| run: | | |
| # Clean any existing volumes | |
| make clean || true | |
| # Run tests based on target version | |
| case "${{ matrix.target_version }}" in | |
| 16) | |
| # Test 14 -> 16 and 15 -> 16 | |
| task test:upgrade-14-to-16 | |
| task test:upgrade-15-to-16 | |
| ;; | |
| 17) | |
| # Test all paths to 17 | |
| task test:upgrade-14-to-17 | |
| ;; | |
| esac |