Automatically update Docker image on GHCR

This commit is contained in:
Ilya Fedin 2022-04-18 16:33:40 +04:00 committed by John Preston
parent 41288f5ddb
commit 86105403bf

View File

@ -15,6 +15,9 @@ jobs:
name: Ubuntu
runs-on: ubuntu-latest
env:
IMAGE_TAG: ghcr.io/${{ github.repository }}/centos_env:latest
steps:
- name: Clone.
uses: actions/checkout@v2
@ -22,4 +25,10 @@ jobs:
submodules: recursive
- name: Docker image build.
run: docker build -t telegram_desktop --build-arg DEBUG= Telegram/build/docker/centos_env
run: docker build -t $IMAGE_TAG --build-arg DEBUG= Telegram/build/docker/centos_env
- name: Push the Docker image.
if: ${{ github.ref_name == github.repository.default_branch }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
docker push $IMAGE_TAG