Skip to content

Commit

Permalink
Merge pull request #587 from NatLibFi/upgrade-gh-actions
Browse files Browse the repository at this point in the history
Update GitHub Actions
  • Loading branch information
juhoinkinen authored Jun 16, 2022
2 parents 0593592 + d535751 commit ecf2f45
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
name: test on Python ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install system packages
run: |
sudo apt-get install \
libvoikko1 \
voikko-fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -64,9 +64,9 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=./
pytest --cov=./ --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0

publish-docker-latest:
name: publish latest Docker image
Expand All @@ -75,20 +75,20 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Login to Quay.io
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1.14.1
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2.0.0
with:
registry: quay.io
username: ${{ secrets.YHTEENTOIMIVUUSPALVELUT_QUAY_IO_USERNAME }}
password: ${{ secrets.YHTEENTOIMIVUUSPALVELUT_QUAY_IO_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681 # v3.6.2
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v4.0.1
with:
images: quay.io/natlibfi/annif
tags: |
latest
- name: Build and push to Quay.io
uses: docker/build-push-action@7f9d37fa544684fb73bfe4835ed7214c255ce02b # v2.9.0
uses: docker/build-push-action@ae551b19e49efd4e98792db7592c17c09b89db8d8 # v3.0.0
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -100,9 +100,9 @@ jobs:
runs-on: ubuntu-20.04
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.8'
cache: pip
Expand All @@ -112,26 +112,26 @@ jobs:
python -m pip install wheel
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295 # v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Login to Quay.io
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1.14.1
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2.0.0
with:
registry: quay.io
username: ${{ secrets.YHTEENTOIMIVUUSPALVELUT_QUAY_IO_USERNAME }}
password: ${{ secrets.YHTEENTOIMIVUUSPALVELUT_QUAY_IO_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681 # v3.6.2
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v4.0.1
with:
images: quay.io/natlibfi/annif
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push to Quay.io
uses: docker/build-push-action@7f9d37fa544684fb73bfe4835ed7214c255ce02b # v2.9.0
uses: docker/build-push-action@ae551b19e49efd4e98792db7592c17c09b89db8d8 # v3.0.0
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit ecf2f45

Please sign in to comment.