fix(ipk): normalize file modes before writing tar headers #2176
Workflow file for this run
This file contains hidden or 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: build | |
| concurrency: | |
| group: ${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - main | |
| paths: | |
| - "go.*" | |
| - "**/*.go" | |
| - "Taskfile.yml" | |
| - "Dockerfile" | |
| - ".github/workflows/*.yml" | |
| - "testdata/**" | |
| - ".goreleaser.yml" | |
| pull_request: | |
| paths: | |
| - "go.*" | |
| - "**/*.go" | |
| - "Taskfile.yml" | |
| - "Dockerfile" | |
| - ".github/workflows/*.yml" | |
| - "testdata/**" | |
| - ".goreleaser.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| license-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - name: Check licenses | |
| run: go run github.com/google/go-licenses/v2@latest check --allowed_licenses=MIT,Apache-2.0,BSD-3-Clause,BSD-2-Clause,ISC,MPL-2.0 ./... | |
| semgrep: | |
| uses: caarlos0/meta/.github/workflows/semgrep.yml@c7f17af352dac91fa6c785d06ebac8547f1abdd3 # v0.1.0 | |
| unit-tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: task setup | |
| - run: task test | |
| - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.txt | |
| acceptance-tests: | |
| strategy: | |
| matrix: | |
| pkgFormat: [deb, rpm, apk, archlinux, ipk] | |
| pkgPlatform: [amd64, arm64, 386, ppc64le, armv6, armv7, s390x] | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_CLI_EXPERIMENTAL: "enabled" | |
| NO_TEST_PPC64LE: "true" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0 | |
| - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 | |
| - run: task setup | |
| - run: task acceptance | |
| env: | |
| TEST_PATTERN: "/${{ matrix.pkgFormat }}/${{ matrix.pkgPlatform }}/" | |
| msix-acceptance-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: task setup | |
| - run: task acceptance | |
| env: | |
| TEST_PATTERN: "TestMSIXStructure" | |
| windows-build-pkgs: | |
| needs: [unit-tests] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: dist/ | |
| key: ${{ env.sha_short }} | |
| enableCrossOsArchive: true | |
| - run: task acceptance:windows:package | |
| install-windows-pkgs: | |
| runs-on: ubuntu-latest | |
| needs: [windows-build-pkgs] | |
| steps: | |
| - uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0 | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - shell: bash | |
| run: | | |
| echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: dist/ | |
| key: ${{ env.sha_short }} | |
| enableCrossOsArchive: true | |
| - run: task acceptance:windows:install | |
| msix-windows-install: | |
| needs: [unit-tests] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: stable | |
| - uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and sign MSIX package | |
| run: task acceptance:windows:package:msix | |
| - name: Install MSIX package | |
| run: task acceptance:windows:install:msix | |
| - name: Verify installed app runs correctly | |
| shell: pwsh | |
| run: | | |
| $pkg = Get-AppxPackage -Name "com.example.foo" | |
| $exe = Join-Path $pkg.InstallLocation "app\testapp.exe" | |
| $output = & $exe 2>&1 | |
| if ($output -ne "nfpm-msix-test-ok") { | |
| Write-Error "Expected 'nfpm-msix-test-ok' but got '$output'" | |
| exit 1 | |
| } |