-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Julien
committed
Nov 16, 2023
1 parent
4985f78
commit e3d7222
Showing
4 changed files
with
48 additions
and
40 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
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 |
---|---|---|
@@ -1,12 +1,39 @@ | ||
name: 'Merge' | ||
description: 'Merge images' | ||
inputs: | ||
tags: | ||
description: 'Tags' | ||
required: false | ||
default: '' | ||
image: | ||
description: 'Image target' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download digests | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: digests | ||
path: /tmp/teslamate | ||
path: /tmp/digest | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ inputs.image }} | ||
tags: ${{ inputs.tags }} | ||
|
||
- name: Create manifest list and push | ||
working-directory: /tmp/digests | ||
shell: bash | ||
run: | | ||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) | ||
- name: Inspect image | ||
shell: bash | ||
run: | | ||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} |
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 |
---|---|---|
|
@@ -47,33 +47,24 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: | ||
- teslamate_build | ||
steps: | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: teslamate | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- uses: ./.github/actions/merge | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY_IMAGE }} | ||
image: ${{ env.REGISTRY_IMAGE }} | ||
tags: | | ||
type=schedule,pattern=edge | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=edge | ||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: teslamate | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Create manifest list and push | ||
working-directory: /tmp/teslamate/digests | ||
run: | | ||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) | ||
- name: Inspect image | ||
run: | | ||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} | ||
grafana: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
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 |
---|---|---|
|
@@ -54,26 +54,17 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Merge | ||
id: merge | ||
uses: ./.github/actions/merge | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create manifest list and push | ||
working-directory: /tmp/teslamate/digests | ||
run: | | ||
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:$(cat /tmp/teslamate/version) \ | ||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) | ||
- name: Inspect image | ||
run: | | ||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:$(cat /tmp/teslamate/version) | ||
- name: Merge | ||
id: merge | ||
uses: ./.github/actions/merge | ||
with: | ||
image: ${{ env.REGISTRY_IMAGE }} | ||
|
||
grafana: | ||
runs-on: ubuntu-latest | ||
|