chore: avoid exiting if config file is not writable #224
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: Push | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04] | |
go: ["1.23.7", "1.24.1"] | |
goos: [linux] | |
goarch: [amd64, arm64] | |
permissions: | |
contents: read | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Go | |
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: go mod download | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go mod download | |
- name: Build | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
CGO_ENABLED: 0 | |
SRC_PATH: github.com/pterodactyl/wings | |
run: | | |
go build -v -trimpath -ldflags="-s -w -X ${SRC_PATH}/system.Version=dev-${GITHUB_SHA:0:7}" -o dist/wings ${SRC_PATH} | |
go build -v -trimpath -ldflags="-X ${SRC_PATH}/system.Version=dev-${GITHUB_SHA:0:7}" -o dist/wings_debug ${SRC_PATH} | |
chmod 755 dist/* | |
- name: go test | |
if: ${{ matrix.goarch == 'amd64' }} | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go test $(go list ./...) | |
- name: go test -race | |
if: ${{ matrix.goarch == 'amd64' }} | |
env: | |
CGO_ENABLED: 1 | |
run: | | |
go test -race $(go list ./...) | |
- name: Upload Release Artifact | |
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.23.7' }} | |
with: | |
name: wings_linux_${{ matrix.goarch }} | |
path: dist/wings | |
- name: Upload Debug Artifact | |
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.23.7' }} | |
with: | |
name: wings_linux_${{ matrix.goarch }}_debug | |
path: dist/wings_debug |