Skip to content

Commit

Permalink
feat: add Github Action to build Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
pviotti committed Mar 10, 2024
1 parent f2c9adb commit 68cedbf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Docker login
uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push pviotti/stockrcmdr Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: pviotti/pocket-counter:latest

0 comments on commit 68cedbf

Please sign in to comment.