Skip to content

feat: 3.2.03

feat: 3.2.03 #5

Workflow file for this run

name: Build and Release AvitoParser docker image
permissions:
contents: read
packages: write
on:
workflow_dispatch:
push:
tags: [ "v*.*.*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to GitHub container registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Convert repository owner to lowercase
run: |
echo "LOWERCASE_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER@L}" >>${GITHUB_ENV}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Remove the leading "v" prefix
id: prep
shell: bash
run: |
tag=$(echo $GITHUB_REF_NAME | sed 's/^v//')
echo "Using this tag for image: $tag"
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5.0.0
with:
builder: ${{ steps.buildx.outputs.name }}
file: Dockerfile
platforms: linux/arm64,linux/amd64
push: true
tags: |
ghcr.io/${{ env.LOWERCASE_REPOSITORY_OWNER }}/parser_avito:${{ steps.prep.outputs.tag }}
ghcr.io/${{ env.LOWERCASE_REPOSITORY_OWNER }}/parser_avito:latest
cache-from: type=gha
cache-to: type=gha,mode=max