Skip to content

Add multiplatform deployment#351

Merged
kellerza merged 5 commits intokellerza:mainfrom
maslyankov:improvement/make-build-multiplatform
Oct 16, 2024
Merged

Add multiplatform deployment#351
kellerza merged 5 commits intokellerza:mainfrom
maslyankov:improvement/make-build-multiplatform

Conversation

@maslyankov
Copy link
Copy Markdown
Contributor

@maslyankov maslyankov commented Oct 12, 2024

Making the GitHub Actions workflow build a multi-platform image would make standalone deployments much easier to achieve as you use the same image url for all platforms. This has been tested by myself and you can see the results bellow.

Workflow: https://github.com/maslyankov/sunsynk/actions/workflows/deploy-multi-mp.yml
Resulting image/package: https://github.com/maslyankov/sunsynk/pkgs/container/hass-addon-sunsynk-multi

This change would also require docs changes, but I will get to that if there is interest to merge it.
I am currently using the build image like this, same can be used on all platforms:

compose.yml

services:
  sunsynk-multi:
    image: ghcr.io/maslyankov/hass-addon-sunsynk-multi:main
    restart: unless-stopped
    volumes:
      - ./site_data/sunsynk/options.yaml:/data/options.yaml
    environment:
      MQTT_HOST: mqtt
      MQTT_PORT: 1883
      MQTT_USERNAME: ${MQTT_USER}
      MQTT_PASSWORD: ${MQTT_PASSWORD}
      S6_KEEP_ENV: 1

@kellerza
Copy link
Copy Markdown
Owner

I like the idea

Can you deploy both at the same time? (current /{arch} and this proposal?
Is the jq command enough to get the image tag?

@kellerza
Copy link
Copy Markdown
Owner

Today we publish the images at

ghcr.io/kellerza/hass-addon-sunsynk-multi/{arch}

Can we publish this multi-arch image at the same time?

ghcr.io/kellerza/hass-addon-sunsynk-multi

In that case we can merge and then update the docs & config.yaml files once builds are successfully published

@maslyankov
Copy link
Copy Markdown
Contributor Author

Today we publish the images at

ghcr.io/kellerza/hass-addon-sunsynk-multi/{arch}

Can we publish this multi-arch image at the same time?

ghcr.io/kellerza/hass-addon-sunsynk-multi

In that case we can merge and then update the docs & config.yaml files once builds are successfully published

Yes, I will work on that the following days.

@kellerza kellerza merged commit c11dc69 into kellerza:main Oct 16, 2024
maslyankov added a commit to maslyankov/sunsynk that referenced this pull request Oct 16, 2024
@maslyankov
Copy link
Copy Markdown
Contributor Author

maslyankov commented Oct 16, 2024

The workflow is not ready to be merged. The above commits do not provide the discussed functionality.

kellerza added a commit that referenced this pull request Oct 16, 2024
@kellerza
Copy link
Copy Markdown
Owner

The workflow is not ready to be merged.

Should I revert? or will you do changes in a new PR

TBH, not sure if reverting will re-open this PR

@maslyankov
Copy link
Copy Markdown
Contributor Author

I can do a new PR, just please disable this action so it does not make some mess. 😄

@maslyankov
Copy link
Copy Markdown
Contributor Author

#355 Changes submitted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants