diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d7007f4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly \ No newline at end of file diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml new file mode 100644 index 0000000..5af00da --- /dev/null +++ b/.github/workflows/build-multiarch.yaml @@ -0,0 +1,43 @@ +name: Build and push multi-arch images + +on: + workflow_dispatch: + inputs: + gitRef: + description: Commit, tag or branch name to deploy + required: true + type: string + default: main + pushToRegistry: + description: Push to image registry. Set to false to build without pushing. + required: true + type: boolean + default: true + # push: + # branches: + # - main + # schedule: + # - cron: '34 3 * * *' + +env: + REGISTRY_BASE: ghcr.io/publishing-platform + +jobs: + configure_builds: + name: Read configuration from build-matrix.json + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + matrix_versions: ${{ steps.set-matrix.outputs.matrix_versions }} + runs_on: ${{ steps.set-matrix.outputs.runs_on }} + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - id: set-matrix + run: | + { + echo "matrix=$(jq -c . < build-matrix.json)" + echo "matrix_versions=$(jq -c .version < build-matrix.json)" + echo "runs_on=$(jq -c .runs_on < build-matrix.json)" + } >> "$GITHUB_OUTPUT" \ No newline at end of file diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..1bd119c --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,23 @@ +name: Run linters/fixers +on: [push] +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 + hadolint: + name: Hadolint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + show-progress: false + - uses: jbergstroem/hadolint-gh-action@eac45b98f6d761309202bd201205a8f8c988bfad # v1.11.0 + with: + dockerfile: '**/*Dockerfile' + error_level: '1' # Fail on warning or above. \ No newline at end of file diff --git a/build-matrix.json b/build-matrix.json new file mode 100644 index 0000000..fcc6b8e --- /dev/null +++ b/build-matrix.json @@ -0,0 +1,21 @@ +{ + "version": [ + { + "rubyver": [ + "3", "2", "4" + ], + "checksum": "c72b3c5c30482dca18b0f868c9075f3f47d8168eaf626d4e682ce5b59c858692", + "extra": "" + } + ], + "runs_on": [ + { + "runner_type": "ubuntu-latest", + "arch": "amd64" + }, + { + "runner_type": "ubuntu-24.04-arm", + "arch": "arm64" + } + ] +} \ No newline at end of file