Skip to content

Commit

Permalink
Merge pull request #4 from robinstraub/ci/add-docker-build-action
Browse files Browse the repository at this point in the history
ci: add docker build action
  • Loading branch information
AbdelStark authored May 21, 2023
2 parents cd0581b + ff5781e commit c251318
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Push Docker Image

on:
release:
types:
- created

jobs:
build-and-push:
runs-on: ubuntu-latest

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

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
file: infra/docker/Dockerfile
tags: >
ghcr.io/${{ github.repository }}:latest,
ghcr.io/${{github.repository }}:${{ github.event.release.tag_name }}

0 comments on commit c251318

Please sign in to comment.