Consolidate #789
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: Docker Image Workflow | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-linux: | |
| defaults: | |
| run: | |
| # Ensures environment gets sourced right | |
| shell: bash -e -l {0} | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Host Dependencies | |
| run: | | |
| sudo apt-get install python3-pip | |
| pip3 install psycopg | |
| python3 -c "import psycopg; print(psycopg.__version__)" | |
| - name: Run Docker build script | |
| run: sh build_docker_image.sh | |
| - name: Publish to Github Container Registry | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| env: | |
| CR_PAT: ${{ secrets.CR_PAT }} | |
| run: | | |
| echo $CR_PAT | docker login ghcr.io -u akrherz --password-stdin | |
| docker push ghcr.io/akrherz/iem_database:test_data | |
| docker push ghcr.io/akrherz/iem_database:no_test_data |