-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 2025.01.04-abbd0b48
- 2025.01.04-61765fd0
- 2025.01.04-2c39a50f
- 2025.01.02-63e73826
- 2025.01.01-ae1f0cc1
- 2024.12.31-39564aea
- 2024.12.31-4d0b552f
- 2024.12.30-c0545a87
- 2024.12.30-5de5b504
- 2024.07.13-82ddc6e9
- 2024.04.29-30cf7732
- 2024.01.24-ea3cd430
- 2024.01.21-088d4ca8
- 2024.01.21-33e8cd7c
- 2024.01.20-94084d56
- 2024.01.19-ffca9c12
- 2024.01.19-90077b92
- 2024.01.19-835bff82
- 2024.01.19-429ab1c5
- 2024.01.19-253f49bc
- 2024.01.19-027d65d5
- 2024.01.18-b83b7d15
- 2024.01.18-4475eb63
- 2024.01.17-f79b1d8a
- 2024.01.17-e8eb8dd7
- 2024.01.17-d6e027ab
- 2024.01.17-1114ad05
- 2024.01.17-29afb853
- 2024.01.17-5df26edb
- 2024.01.17-2c728a28
- 2024.01.16-f8ed644b
- 2024.01.16-761f706a
- 2024.01.16-9c624111
- 2024.01.15-fba50505
- 2024.01.14-3c7b22d4
- 2024.01.13-b7277f05
- 2024.01.12-ff6087e2
- 2024.01.12-afa3bc86
- 2024.01.12-108ff95d
- 2024.01.12-43f9e11d
- 2024.01.11-9564506d
- 2024.01.11-6a00caa3
- 2024.01.10-a8f0a956
- 2024.01.10-86c015b5
- 2024.01.10-8beb67bb
- 2024.01.10-2ddf9413
- 2024.01.09-c452466f
- 2024.01.09-c0925c04
- 2024.01.09-ab0af6b7
- 2024.01.09-509d1790
- 2024.01.07-dc762b82
- 2024.01.07-118ee247
- 2024.01.07-92fb55e0
- 2024.01.07-8daf3a61
- 2024.01.07-8b2527fc
- 2024.01.07-5ac41477
- 2024.01.06-fc7ae219
- 2024.01.06-f8aad93d
- 2024.01.06-d884fb09
- 2024.01.06-bf77170b
- 2024.01.06-bb8fdbb3
- 2024.01.06-b5e64128
- 2024.01.06-5915ee93
- 2024.01.06-90dd2a57
- 2024.01.06-65f6cfc7
- 2024.01.06-9d302ae6
- 2024.01.06-1c8564c4
- 2024.01.06-0e7bd37e
- 2024.01.06-0da21047
- 2024.01.05-d995de93
- 2024.01.05-816211da
- 2024.01.05-465c3086
- 2024.01.05-79e43690
- 2024.01.05-52b63e97
- 2024.01.05-27d5bd8a
- 2024.01.04-b3bcdb47
- 2024.01.04-a76b0bbf
- 2024.01.04-a61d4be3
- 2024.01.04-4211b51f
- 2024.01.04-71aac28c
- 2024.01.04-41d0368a
Showing
4 changed files
with
161 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
github: wez | ||
patreon: WezFurlong | ||
ko_fi: wezfurlong | ||
liberapay: wez |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
all: | ||
patterns: | ||
- "*" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 |
---|---|---|
@@ -0,0 +1,138 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.rs" | ||
- "addon/**" | ||
- "**/Cargo.*" | ||
- ".github/workflows/build.yml" | ||
- ".cargo/config.toml" | ||
- "build-cross.sh" | ||
- "build-docker.sh" | ||
- "Dockerfile" | ||
- ".dockerignore" | ||
|
||
env: | ||
IMAGE: ghcr.io/wez/govee2mqtt | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm/v7 | ||
- linux/arm64 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Docker meta | ||
if: ${{ github.event_name != 'pull_request' }} | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.IMAGE }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | ||
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }} | ||
type=ref,event=pr | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to the Container registry | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: https://ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build executable | ||
run: ./build-cross.sh ${{ matrix.platform }} | ||
- name: Build No Push | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: ${{ matrix.platform }} | ||
push: false | ||
- name: Build and push by digest | ||
if: ${{ github.event_name != 'pull_request' }} | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: ${{ matrix.platform }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=true | ||
- name: Export digest | ||
if: ${{ github.event_name != 'pull_request' }} | ||
id: digest | ||
run: | | ||
mkdir -p /tmp/digests | ||
digest="${{ steps.build.outputs.digest }}" | ||
touch "/tmp/digests/${digest#sha256:}" | ||
echo "DIGEST_NAME=$(echo ${{ matrix.platform }} | sed 's,/,-,g')" >> $GITHUB_OUTPUT | ||
- name: Upload digest | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: digest-${{ steps.digest.outputs.DIGEST_NAME }} | ||
path: /tmp/digests/* | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
merge: | ||
if: ${{ github.event_name != 'pull_request' }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Download digests | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: digest-* | ||
merge-multiple: true | ||
path: /tmp/digests | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.IMAGE }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | ||
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }} | ||
type=ref,event=pr | ||
- name: Login to GHCR | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: https://ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create manifest list and push | ||
working-directory: /tmp/digests | ||
run: | | ||
docker buildx imagetools create \ | ||
${{ github.event_name == 'pull_request' && '--dry-run' || '' }} \ | ||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
$(printf '${{ env.IMAGE }}@sha256:%s ' *) | ||
- name: Inspect image | ||
run: | | ||
docker buildx imagetools inspect ${{ env.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