Skip to content

Commit

Permalink
Docker release image action (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha authored Feb 17, 2024
1 parent bb22e03 commit 637c49d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---

# Build and push a Docker image to GitHub Packages

on: [push]

name: Build and push a Docker image to GitHub Packages

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 637c49d

Please sign in to comment.