From acb31a513899e0ea4e0bc454d97ca08f018869e2 Mon Sep 17 00:00:00 2001 From: "ushi." Date: Fri, 1 Mar 2024 15:13:06 +0100 Subject: [PATCH] fix github action deprecations --- .github/workflows/main.yml | 24 +++++++++++------------- check/dns-record/check.go | 4 ++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff378f7..29b91ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,13 +74,12 @@ jobs: env: CARCH: ${{ matrix.arch }} steps: - - id: goarch - run: | + - run: | case "${{ matrix.arch }}" in - "x86_64") echo "::set-output name=GOARCH::amd64";; - "armv7h") echo "::set-output name=GOARCH::arm";; - "aarch64") echo "::set-output name=GOARCH::arm64";; - *) echo "::set-output name=GOARCH::${{ matrix.arch }}";; + "x86_64") echo "GOARCH=amd64" >> "${GITHUB_ENV}";; + "armv7h") echo "GOARCH=arm" >> "${GITHUB_ENV}";; + "aarch64") echo "GOARCH=arm64" >> "${GITHUB_ENV}";; + *) echo "GOARCH=${{ matrix.arch }}" >> "${GITHUB_ENV}";; esac - run: | pacman -Syu --noconfirm @@ -92,7 +91,7 @@ jobs: PACKAGE_SIGNING_KEY: ${{ secrets.PACKAGE_SIGNING_KEY }} - uses: actions/download-artifact@v4 with: - name: gesundheit-${{ steps.goarch.outputs.GOARCH }} + name: gesundheit-${{ env.GOARCH }} path: build - uses: "actions/checkout@v4" with: @@ -120,16 +119,15 @@ jobs: matrix: arch: ["i386", "amd64", "armhf", "arm64"] steps: - - id: goarch - run: | + - run: | case "${{ matrix.arch }}" in - "i386") echo "::set-output name=GOARCH::386";; - "armhf") echo "::set-output name=GOARCH::arm";; - *) echo "::set-output name=GOARCH::${{ matrix.arch }}";; + "i386") echo "GOARCH=386" >> "${GITHUB_ENV}";; + "armhf") echo "GOARCH=arm" >> "${GITHUB_ENV}";; + *) echo "GOARCH=${{ matrix.arch }}" >> "${GITHUB_ENV}";; esac - uses: actions/download-artifact@v4 with: - name: gesundheit-${{ steps.goarch.outputs.GOARCH }} + name: gesundheit-${{ env.GOARCH }} path: bin - uses: "actions/checkout@v4" with: diff --git a/check/dns-record/check.go b/check/dns-record/check.go index f998b0f..5b4ffd4 100644 --- a/check/dns-record/check.go +++ b/check/dns-record/check.go @@ -45,13 +45,13 @@ func (c Check) Exec() result.Result { } for _, r := range records { if r == c.Value { - return result.OK("%s %s resolves to %s", c.Type, c.Name, c.Value) + return result.OK("%s %s resolves to %#v", c.Type, c.Name, c.Value) } } if len(records) == 0 { return result.Fail("could not find any records for %s %s", c.Type, c.Name) } - return result.Fail("%s %s resolves to %s", c.Type, c.Name, records[0]) + return result.Fail("%s %s resolves to %#v", c.Type, c.Name, records[0]) } func resolver(addr string) *net.Resolver {