| 1 |
--- |
| 2 |
name: Continous integration |
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
jobs: |
| 8 |
tests: |
| 9 |
name: Tests |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- uses: actions/checkout@v3 |
| 13 |
- name: Tests |
| 14 |
run: make check |
| 15 |
build: |
| 16 |
name: Docker build |
| 17 |
runs-on: ubuntu-latest |
| 18 |
needs: |
| 19 |
- tests |
| 20 |
steps: |
| 21 |
- uses: actions/checkout@v3 |
| 22 |
- name: Login to GitHub Container Registry |
| 23 |
uses: docker/login-action@v2 |
| 24 |
with: |
| 25 |
registry: ghcr.io |
| 26 |
username: ${{ github.actor }} |
| 27 |
password: ${{ secrets.GITHUB_TOKEN }} |
| 28 |
- run: docker build . -t `echo ghcr.io/${{ github.repository }}:latest | tr '[:upper:]' '[:lower:]'` |
| 29 |
- run: docker push `echo ghcr.io/${{ github.repository }}:latest | tr '[:upper:]' '[:lower:]'` |