-
-
Notifications
You must be signed in to change notification settings - Fork 29
Introduce a new workflow to publish automatically new merged changes into main a :latest #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
c90af10
4b0a908
56f311a
7b5d08b
086a953
c433c6e
6120028
415955f
cc96a93
58e8a2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: "Publish :latest docker tag" | ||
|
|
||
| # Trigger the workflow on any commit or merge to the main branch | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| DOCKER_IMAGE_REGISTRY_PATH: nspanelmanager/nspanelmanager | ||
| DOCKER_TAG: test # TODO: change it after proper testing (after merge) | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Get Git commit timestamps | ||
| run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | ||
|
|
||
| - name: Set up QEMU (required for Buildx) | ||
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | ||
|
|
||
| - name: Login to DockerHub | ||
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | ||
| with: | ||
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
| password: ${{ secrets.DOCKER_HUB_SECRET }} | ||
|
|
||
| - name: Build and push multi-arch image | ||
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | ||
| with: | ||
| context: ./docker # Path to your Dockerfile | ||
| # note: platforms list: https://github.com/docker/setup-qemu-action | ||
| platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,qemu-arm,qemu-aarch64 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these run in parallel or serially?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to go the simple way first so it is currently: sequential We can change it later on using a matrix and some mechanisms (the doc also mention that variant but it is slightly more complicated to setup) Let me know if you want it already in parallel I can give it a shot too
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current free tier we are using have a limit of 6 hours per job, so not doing it in parallel it will fail. Also, we are currently building with Home Assistant builder and what is considered This is a known issue that I have to fix, unfortunately it requires a bit of work and I don't feel we should do that work before we publish the current beta as stable. Basically, we need to remove the ZMQ and rework the communication between the web interface and the MQTTManager-component. |
||
| push: true | ||
| tags: ${{ env.DOCKER_IMAGE_REGISTRY_PATH }}:${{ env.DOCKER_TAG }} | ||
| env: | ||
| SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} | ||
Uh oh!
There was an error while loading. Please reload this page.