new pipeline version handling
This commit is contained in:
parent
cfc0d14fc3
commit
d199fd5592
21
.github/workflows/docker-image.yml
vendored
21
.github/workflows/docker-image.yml
vendored
@ -1,7 +1,6 @@
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
@ -11,8 +10,18 @@ jobs:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run read-yaml action
|
||||
id: yaml-data
|
||||
uses: jbutcher5/read-yaml@1.6
|
||||
with:
|
||||
file: "./matter-bridge/config.yml"
|
||||
key-path: '["version"]'
|
||||
|
||||
- name: Display read-yaml output
|
||||
run: echo "${{ steps.yaml-data.outputs.data }}"
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
uses: docker/login-action@v3.0.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
@ -20,12 +29,14 @@ jobs:
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}},value=${{ steps.yaml-data.outpus.data }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
with:
|
||||
context: ./matter-bridge
|
||||
file: ./matter-bridge/Dockerfile
|
||||
|
Loading…
Reference in New Issue
Block a user