Skip to content

Commit

Permalink
Feat: add taggs for docker images (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
icerzack authored May 11, 2024
1 parent 7f94ece commit 9b66a29
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- 'v*'

jobs:
docker:
Expand All @@ -21,10 +23,20 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/excaliroom
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=ref,event=tag
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./build/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/excaliroom:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ version: "3.8"

services:
app:
build:
context: .
dockerfile: build/Dockerfile
image: icerzack/excaliroom:latest
platform: linux/amd64
environment:
- CONFIG_PATH=config.yaml
ports:
Expand Down

0 comments on commit 9b66a29

Please sign in to comment.