Skip to content

Commit

Permalink
tec: Build the production Docker image on ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Sep 28, 2023
1 parent dd71926 commit 42260f5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Docker image

on:
push:
branches:
- 'main'
tags:
- '*'

env:
docker_image_version: ${{ github.ref == 'refs/heads/main' && 'edge' || github.ref_name }}

jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
run: make docker-image VERSION=${{ env.docker_image_version }}

- name: Push the Docker image to GHCR
run: docker push ghcr.io/probesys/bileto:${{ env.docker_image_version }}

0 comments on commit 42260f5

Please sign in to comment.