Skip to content

Commit

Permalink
deploy gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
aanand1 committed Sep 6, 2024
1 parent 36200fd commit 6b02a1a
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PFL Build and Push Docker Image to GHCR

on:
push:

jobs:
build-and-push:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

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

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/fastlane-labs/bdn-operations-relay
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
latest-{{branch}}
sha-{{sha}}
- name: Authenticate to Github registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 6b02a1a

Please sign in to comment.