Skip to content

Commit

Permalink
Revamp Github CI/CD and Cleanup Outdated Contents
Browse files Browse the repository at this point in the history
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
d3sch41n authored and facebook-github-bot committed Dec 6, 2023
1 parent 03882db commit 2bb8c24
Show file tree
Hide file tree
Showing 51 changed files with 35 additions and 2,686 deletions.
37 changes: 0 additions & 37 deletions .asdf

This file was deleted.

10 changes: 0 additions & 10 deletions .editorconfig

This file was deleted.

6 changes: 0 additions & 6 deletions .github/renovate-bot.json5

This file was deleted.

36 changes: 0 additions & 36 deletions .github/renovate.json5

This file was deleted.

14 changes: 0 additions & 14 deletions .github/renovate/autoMerge.json5

This file was deleted.

Empty file modified .github/workflows/meta-labeler.yaml
100755 → 100644
Empty file.
Empty file modified .github/workflows/meta-sync-labels.yaml
100755 → 100644
Empty file.
46 changes: 3 additions & 43 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
66 changes: 0 additions & 66 deletions .github/workflows/renovate.yaml

This file was deleted.

Empty file modified .github/workflows/semgrep.yaml
100755 → 100644
Empty file.
32 changes: 0 additions & 32 deletions .hooks/add-authored-by.sh

This file was deleted.

42 changes: 0 additions & 42 deletions .hooks/generate-docs.sh

This file was deleted.

25 changes: 0 additions & 25 deletions .hooks/go-critic.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .hooks/go-no-replacement.sh

This file was deleted.

19 changes: 0 additions & 19 deletions .hooks/go-vet.sh

This file was deleted.

Loading

0 comments on commit 2bb8c24

Please sign in to comment.