Skip to content

Merge pull request #116 from inspirehep/fix-autodeploy #143

Merge pull request #116 from inspirehep/fix-autodeploy

Merge pull request #116 from inspirehep/fix-autodeploy #143

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/[email protected]
- 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:
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/[email protected]
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 }}