Bumped version, ran poetry update, and improved github action. #1
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
name: Docker Image CI | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
push: | ||
name: Push to registry. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11.6' | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
- name: Get version and tag image | ||
run: | | ||
poetry_version=$(poetry version | awk '{print $2}') | ||
echo "version=${poetry_version}" >> $GITHUB_ENV | ||
- name: Login to registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_PASSWORD }} | ||
- name: Push to dockerhub | ||
run: | | ||
docker build . --file Dockerfile --tag fjodorvr/publication-date-updater:${{ env.version }} | ||
docker push fjodorvr/publication-date-updater:${{ env.version }} |