Skip to content

Commit

Permalink
Add image publish workflow (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
  • Loading branch information
NilashishC committed Apr 12, 2024
1 parent 3a94bff commit ff46a27
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Publish Image

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
push:
branches: [main]
workflow_dispatch:

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the container image for ansible-creator-service and publish it
run: |
docker build -f $GITHUB_WORKSPACE/Containerfile -t ghcr.io/nilashishc/ansible-creator-service:latest .
docker push t ghcr.io/nilashishc/ansible-creator-service:latest

0 comments on commit ff46a27

Please sign in to comment.