-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tec: Build the production Docker image on ghcr.io
- Loading branch information
1 parent
dd71926
commit 42260f5
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |