Skip to content

Commit

Permalink
Create docker file for repository-nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Tiwari committed Sep 18, 2024
1 parent 7c7e557 commit 244dd5b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/repository_nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Push Docker Image

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Generate container metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/obmondo/repository-nginx
tags: |
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
flavor: |
latest=false
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push container image
id: docker_build
uses: docker/build-push-action@v2
with:
file: "./repository-nginx/Dockerfile"
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}

1 change: 1 addition & 0 deletions repository-nginx
Submodule repository-nginx added at f0ed8a

0 comments on commit 244dd5b

Please sign in to comment.