Update dotnet.yml #192
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
name: .NET | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- arch: "armv7" | |
rid: "linux-musl-arm" | |
- arch: "amd64" | |
rid: "linux-musl-x64" | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: build_release | |
run: | | |
cd FCAAddon/FCAClient | |
dotnet publish -r ${{ matrix.rid }} --configuration Release --self-contained -o build/ | |
- name: docker_login | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: create_image | |
uses: home-assistant/builder@master | |
with: | |
args: | | |
--platform ${{ matrix.arch }} \ | |
--target FCAAddon | |
- name: tag_image | |
run: | | |
docker tag ghcr.io/${{ github.repository_owner }}/FCAUconnect-HA:latest ghcr.io/${{ github.repository_owner }}/FCAUconnect-HA:${{ matrix.arch }}-${{ github.sha }} | |
- name: push_image | |
run: | | |
docker push ghcr.io/${{ github.repository_owner }}/FCAUconnect-HA:${{ matrix.arch }}-${{ github.sha }} | |
docker push ghcr.io/${{ github.repository_owner }}/FCAUconnect-HA:latest |