Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bkataru authored Dec 8, 2023
1 parent 981dea1 commit ca5109d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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/impulses:${{ steps.repo-basename.outputs.value }} .
- name: Push the Docker image
run: docker push bkataru/impulses:${{ steps.repo-basename.outputs.value }}

0 comments on commit ca5109d

Please sign in to comment.