Merge pull request #128 from inspirehep/kube-fix #191
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: Pull request master (lint and test) | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| lint_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Lint - Pre-commit check | |
| uses: pre-commit/action@v3.0.1 | |
| - name: Prep Build | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: docker build --target refextract-tests -t refextract . | |
| - name: Run tests | |
| run: > | |
| docker run | |
| --entrypoint poetry | |
| refextract | |
| run pytest | |
| push_and_deploy_qa: | |
| runs-on: ubuntu-latest | |
| needs: [lint_and_test] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Build Image | |
| id: build | |
| uses: cern-sis/gh-workflows/.github/actions/docker-build@v6 | |
| with: | |
| registry: registry.cern.ch | |
| stage: refextract | |
| image: cern-sis/inspirehep/refextract | |
| cache: false | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| - name: Deploy QA | |
| uses: cern-sis/gh-workflows/.github/actions/kubernetes-project-new-images@v6.4 | |
| with: | |
| event-type: update | |
| repo: cern-sis/kubernetes-inspire | |
| images: registry.cern.ch/cern-sis/inspirehep/refextract@${{ steps.build.outputs.image-digest }} | |
| token: ${{ secrets.PAT_FIRE_EVENTS_ON_CERN_SIS_KUBERNETES }} |