forked from facebookincubator/ForgeArmory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp Github CI/CD and Cleanup Outdated Contents
Summary: Followup to facebookincubator/TTPForge#446 but for ForgeArmory instead of TTPForge. Read this bullets top-to-bottom - they match the ordering of changed files in this diff: * Remove renovate, as we are no longer using it after moving to fbcode * Remove executable file permissions from files that don't need them * Remove Golang hooks that don't apply to this repository * Remove YAML linters that aren't compatible with TTPForge template format * Remove YAML schema, as it is incomplete and unmaintained, and has been replaced by facebookincubator/TTPForge#475 * Remove mage, as it is not required due to reduced dependency count (in the same manner that it was removed in the corresponding PR against TTPForge) * Remove other files (asdf, tool-versions, etc) that are no longer needed due to simplified dependencies * Remove obsolete docs and examples * Update README.md to reference canonical documentation and reflect developer workflow simplification Differential Revision: D51814055 fbshipit-source-id: 54c5e6bd9f8bf0823f12bbbaa9d82bc82811902d
- Loading branch information
1 parent
03882db
commit 2bb8c24
Showing
51 changed files
with
35 additions
and
2,686 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,54 +5,14 @@ on: | |
types: | ||
- opened | ||
- synchronize | ||
# Run once a week (see https://crontab.guru) | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
workflow_dispatch: | ||
jobs: | ||
pre-commit: | ||
name: Update pre-commit hooks and run pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up git repository | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
|
||
- name: Set up BATS | ||
uses: mig4/setup-bats@af9a00deb21b5d795cabfeaa8d9060410377686d # v1 | ||
with: | ||
bats-version: 1.2.1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 | ||
with: | ||
go-version: "1.21.0" | ||
|
||
- name: Install go module dependencies | ||
run: | | ||
go install mvdan.cc/sh/v3/cmd/shfmt@latest | ||
go install github.com/magefile/mage@latest | ||
- name: Checkout Git repository | ||
uses: actions/checkout@v4 | ||
- name: Install pre-commit | ||
run: pip3 install pre-commit | ||
|
||
- name: Run go mod tidy - necessary to avoid errors with renovatebot PRs | ||
run: pushd magefiles; go mod tidy; popd | ||
|
||
- name: Commit go.mod and go.sum changes to keep pre-commit happy | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add magefiles/go.mod magefiles/go.sum | ||
git diff --quiet && git diff --staged --quiet || \ | ||
git commit -m "Update go.mod and go.sum" | ||
- name: Install pre-commit dependencies | ||
run: mage installDeps | ||
|
||
- name: Run pre-commit | ||
run: mage runPreCommit | ||
run: pre-commit run --all-files |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.