Skip to content

deploy gh action

deploy gh action #1

Workflow file for this run

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 }}