Docker #101
This file contains 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
# .github/workflows/app.yaml | |
name: Docker | |
on: | |
schedule: | |
- cron: '30 10 7,14,21,28 * *' | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- Dockerfile | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
timeout-minutes: 480 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
if: github.repository == 'NGSolve/ngsPETSc' | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build Docker image | |
run: | | |
docker build -t ngspetsc:latest . | |
- name: Push Docker image | |
if: github.repository == 'NGSolve/ngsPETSc' | |
run: | | |
docker tag ngspetsc:latest urzerbinati/ngspetsc:latest | |
docker push urzerbinati/ngspetsc:latest |