Feature/fix h2o (#49) #16
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: Publish Docker image to GHCR | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '**/Dockerfile' | |
| - '**/*.js' | |
| - '**/*.jsx' | |
| - '**/*.json' | |
| - '**/*.py' | |
| - '.github/workflows/docker-publish.yml' | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u callowaysutton --password-stdin | |
| - name: Build Docker image | |
| run: | | |
| make build | |
| docker build -t ghcr.io/geochemical-modeling/js2-gateway:latest \ | |
| -t ghcr.io/geochemical-modeling/js2-gateway:${{ github.sha }} . | |
| - name: Push Docker image | |
| run: | | |
| docker push ghcr.io/geochemical-modeling/js2-gateway:latest | |
| docker push ghcr.io/geochemical-modeling/js2-gateway:${{ github.sha }} |