Skip to content

Update docker-image.yml #6

Update docker-image.yml

Update docker-image.yml #6

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
name: main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: repo-basename
run: |
echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT
shell: bash
- name: Docker login
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Build the Docker image
run: docker build -t bkataru/${{ steps.repo-basename.outputs.value }} .
- name: Push the Docker image
run: docker push bkataru/${{ steps.repo-basename.outputs.value }}