Skip to content

Commit

Permalink
Hassio: publish nightly.DATE-HASH in docker hub (#18762)
Browse files Browse the repository at this point in the history
  • Loading branch information
dm82m authored Feb 14, 2025
1 parent 21c0547 commit 6eef371
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,51 @@ jobs:
- name: Setup Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: evcc/evcc
tags: |
type=raw,value=nightly
type=raw,value=nightly.{{date 'YYYYMMDD'}}-{{sha}}
- name: Publish
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v6
push: true
tags: |
evcc/evcc:nightly
tags: ${{ steps.meta.outputs.tags }}

hassio:
name: Hassio Addon :nightly
needs:
- docker
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master
with:
repository: evcc-io/hassio-addon
token: ${{ secrets.GH_TOKEN }}
path: ./hassio

- name: Update version
run: |
current_date=$(date +%Y%m%d)
short_sha=$(echo "${{ github.sha }}" | cut -c 1-7)
sed -i -e "s/version:.*/version: nightly.${current_date}-${short_sha}/" ./hassio/evcc-nightly/config.yaml
- name: Push
run: |
cd ./hassio
git add .
git config user.name github-actions
git config user.email [email protected]
git commit -am "Mirror evcc nightly release"
git push
apt:
name: Publish APT nightly
Expand Down

0 comments on commit 6eef371

Please sign in to comment.