Skip to content

Merge pull request #169 from markusressel/dependabot/github_actions/g… #220

Merge pull request #169 from markusressel/dependabot/github_actions/g…

Merge pull request #169 from markusressel/dependabot/github_actions/g… #220

name: Docker Image latest
on:
push:
branches: [ master ]
jobs:
dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag markusressel/keel-telegram-bot:latest
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Push the Docker image
run: docker push markusressel/keel-telegram-bot:latest
ghcr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log into ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/markusressel/keel-telegram-bot
tags: latest
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: RELEASE_BRANCH=${{ steps.prep.outputs.branch }}