Skip to content
name: Build Docker image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to ghcr.io
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and tag image
run: |
COMMIT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
docker build -t simple_captcha_solver:latest . --no-cache
- name: Docker TAG
run: docker tag simple_captcha_solver:latest ghcr.io/andriow/simple_captcha_solver:latest
- name: Push image to GHCR
run: docker push ghcr.io/andriow/simple_captcha_solver:latest