Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ CONFLICT! Lineage pull request for: skeleton #78

Merged
merged 79 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
4cb9a4b
Add steps to setup go packages for pre-commit
jasonodoom Jul 10, 2023
53f56b0
Update action/checkout to use same version
jasonodoom Jul 10, 2023
f261099
Set specific gocritic version
jasonodoom Jul 10, 2023
097b573
Update build workflow with package installtion
jasonodoom Jul 10, 2023
254282a
Group go tools together with comment
jasonodoom Jul 11, 2023
ecf3299
Update staticcheck id
jasonodoom Jul 11, 2023
1eaedf5
Update tool names to match author stylization
jasonodoom Jul 11, 2023
fd04757
Update statcicheck stylization
jasonodoom Jul 11, 2023
ddbf6f7
Temporarily use a different branch of cisagov/setup-env-github-action
jsf9k Jul 12, 2023
a8af336
Move go packages install to separate section
jasonodoom Jul 12, 2023
1675b12
Update go-critic name
jasonodoom Jul 12, 2023
c6ab22e
Update staticcheck name
jasonodoom Jul 12, 2023
29de034
Use the correct repo name for the ansible-lint pre-commit hook
jsf9k Jul 13, 2023
1e7cb4f
Correct staticcheck reference to setup-env, sort alphabetically and …
jasonodoom Jul 12, 2023
5f3bc13
Remove Go section coment
jasonodoom Jul 13, 2023
d311825
Remove unnecessary quotes in the dependabot configuration
mcdonnnj Jul 14, 2023
2294d49
Sort the keys in the Dependabot configuration
mcdonnnj Jul 14, 2023
e678502
Delete duplicate word "are"
jsf9k Jul 18, 2023
a518cfb
Reference correct parameter name in comment
jsf9k Jul 28, 2023
0db97d1
Add the ability to specify a token in bump_version.sh
mcdonnnj Aug 9, 2023
f646a73
DRY out logic to update version information
mcdonnnj Aug 9, 2023
cf5c0d7
Change when existing version information is retrieved
mcdonnnj Aug 9, 2023
d6715e7
Remove git push from `bump_version.sh` script
mcdonnnj Aug 15, 2023
948ebde
Fix gosec stylization
jasonodoom Aug 16, 2023
98d3d3f
Revert "Temporarily use a different branch of cisagov/setup-env-githu…
jsf9k Aug 22, 2023
82db36a
Add nixfmt pre-commit hook
jasonodoom Aug 28, 2023
c0b5d5b
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
b04654e
Bump crazy-max/ghaction-github-labeler from 4 to 5
mcdonnnj Sep 11, 2023
49ac8c5
Update the dependabot ignore configuration
mcdonnnj Sep 11, 2023
4ec50ab
Merge pull request #138 from cisagov/add-go-packages
mcdonnnj Sep 13, 2023
8145a93
Merge pull request #139 from cisagov/improvement/use-correct-repo-name
mcdonnnj Sep 13, 2023
ce74358
Merge pull request #140 from cisagov/improvement/update_dependabot_co…
mcdonnnj Sep 13, 2023
338e3e1
Merge pull request #141 from cisagov/documentation/grammar
mcdonnnj Sep 13, 2023
8432f1e
Merge pull request #143 from cisagov/add-nixfmt
mcdonnnj Sep 13, 2023
8cdbc7b
Merge pull request #145 from cisagov/dependabot/github_actions/action…
mcdonnnj Sep 13, 2023
ca49bea
Merge pull request #146 from cisagov/improvement/update_labeler_action
mcdonnnj Sep 13, 2023
94d753d
Update pre-commit hook versions
mcdonnnj Aug 3, 2023
1bc2056
Switch to the pre-commit mirror for black
mcdonnnj Sep 11, 2023
a62ebe7
Add the crazy-max/ghaction-github-status GitHub action
jsf9k Aug 29, 2023
3619c45
Make the lint job depend on the diagnostics job
jsf9k Aug 30, 2023
f437066
Add a GH Action to dump the context
jsf9k Aug 30, 2023
c5e56a2
Give the diagnostics job a descriptive name
jsf9k Aug 30, 2023
9afb516
Add the step-security/harden-runner GH Action
jsf9k Aug 30, 2023
9dc773c
Add a harden-runner task to the lint job as well
jsf9k Aug 30, 2023
bb81ec3
Add a reminder
jsf9k Aug 30, 2023
94903ae
Merge pull request #142 from cisagov/maintenance/update_pre-commit_hooks
mcdonnnj Sep 13, 2023
8d8577c
Merge pull request #148 from cisagov/improvement/change_black_repository
mcdonnnj Sep 13, 2023
c0eed09
Merge pull request #144 from cisagov/improvement/add-github-status-jazz
mcdonnnj Sep 13, 2023
3407aad
Merge github.com:cisagov/skeleton-generic into lineage/skeleton
mcdonnnj Sep 13, 2023
7304857
Enable dependabot ignore directives
mcdonnnj Sep 13, 2023
d86ac5b
Remove unnecessary quotes in the dependabot configuration
mcdonnnj Sep 13, 2023
4186c1a
Sort the keys in the Dependabot configuration
mcdonnnj Sep 13, 2023
95cb005
Bump actions/checkout from 3 to 4
mcdonnnj Sep 13, 2023
c9f43e4
Update job dependencies for the build.yml workflow
mcdonnnj Sep 13, 2023
138fc0f
Adjust key ordering for jobs in the build.yml workflow
mcdonnnj Sep 13, 2023
7eefae0
Remove unnecessary quotes in the build.yml workflow
mcdonnnj Sep 13, 2023
4380bec
Add runner hardening to all jobs in our workflows
mcdonnnj Sep 13, 2023
f0f3e11
Remove unnecessary quotes in the codeql-analysis.yml workflow
mcdonnnj Sep 13, 2023
6ee9882
Bump docker/login-action from 2 to 3
dependabot[bot] Sep 18, 2023
05bb592
Bump docker/setup-buildx-action from 2 to 3
dependabot[bot] Sep 18, 2023
f05a983
Bump docker/setup-qemu-action from 2 to 3
dependabot[bot] Sep 18, 2023
768b6cb
Bump python from 3.11.4-alpine to 3.12.0-alpine
dependabot[bot] Oct 9, 2023
8c6b096
Add a diagnostics job to the CodeQL workflow
jsf9k Oct 11, 2023
6bc69ce
Merge pull request #172 from cisagov/lineage/skeleton
mcdonnnj Dec 6, 2023
dde0921
Merge pull request #177 from cisagov/dependabot/docker/python-3.12.0-…
mcdonnnj Dec 6, 2023
0af9c06
Merge pull request #178 from cisagov/improvement/add-diagnostics-job-…
mcdonnnj Dec 6, 2023
c70e91e
Merge pull request #168 from cisagov/documentation/fix-comment
mcdonnnj Dec 6, 2023
bf95545
Merge pull request #169 from cisagov/improvement/enhance_bump_version…
mcdonnnj Dec 6, 2023
6d49cfa
Merge pull request #173 from cisagov/dependabot/github_actions/docker…
mcdonnnj Dec 6, 2023
8dde580
Merge pull request #175 from cisagov/dependabot/github_actions/docker…
mcdonnnj Dec 6, 2023
1ea8a3f
Merge pull request #176 from cisagov/dependabot/github_actions/docker…
mcdonnnj Dec 6, 2023
b92cc51
Bump actions/github-script from 6 to 7
dependabot[bot] Dec 6, 2023
0196a0d
Bump docker/build-push-action from 4 to 5
dependabot[bot] Dec 6, 2023
ef3438f
Add commented out option to docker/build-push-action
mcdonnnj Dec 6, 2023
d4ddd9c
Merge remote-tracking branch 'skeleton-docker/develop' into lineage/s…
jsf9k Dec 6, 2023
b25144e
Bump version from 1.3.2 to 1.3.3
jsf9k Dec 6, 2023
6ff485e
Merge pull request #181 from cisagov/dependabot/github_actions/action…
mcdonnnj Dec 7, 2023
7e820ba
Merge pull request #174 from cisagov/dependabot/github_actions/docker…
mcdonnnj Dec 7, 2023
69e6253
Merge https://github.com/cisagov/skeleton-docker into lineage/skeleton
Dec 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://bandit.readthedocs.io/en/latest/config.html

# Tests are first included by `tests`, and then excluded by `skips`.
# If `tests` is empty, all tests are are considered included.
# If `tests` is empty, all tests are considered included.

tests:
# - B101
Expand Down
32 changes: 18 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
# these updates when the pull request(s) in the appropriate skeleton are merged
# and Lineage processes these changes.

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
- directory: /
package-ecosystem: docker
schedule:
interval: "weekly"
interval: weekly

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- directory: /
ignore:
# Managed by cisagov/skeleton-generic
- dependency-name: actions/cache
- dependency-name: actions/checkout
- dependency-name: actions/setup-go
- dependency-name: actions/setup-python
- dependency-name: crazy-max/ghaction-dump-context
- dependency-name: crazy-max/ghaction-github-labeler
- dependency-name: crazy-max/ghaction-github-status
- dependency-name: hashicorp/setup-terraform
- dependency-name: mxschmitt/action-tmate
- dependency-name: step-security/harden-runner
# Managed by cisagov/skeleton-docker
- dependency-name: actions/download-artifact
- dependency-name: actions/github-script
Expand All @@ -33,13 +33,17 @@ updates:
- dependency-name: docker/setup-buildx-action
- dependency-name: docker/setup-qemu-action
- dependency-name: github/codeql-action
package-ecosystem: github-actions
schedule:
interval: weekly

- package-ecosystem: "pip"
directory: "/"
- directory: /
package-ecosystem: pip
schedule:
interval: "weekly"
interval: weekly

- package-ecosystem: "terraform"
directory: "/"
- directory: /
package-ecosystem: terraform
schedule:
interval: "weekly"
interval: weekly
version: 2
111 changes: 90 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,39 @@ env:
RUN_TMATE: ${{ secrets.RUN_TMATE }}

jobs:
diagnostics:
name: Run diagnostics
runs-on: ubuntu-latest
steps:
# Note that a duplicate of this step must be added at the top of
# each job.
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- id: github-status
name: Check GitHub status
uses: crazy-max/ghaction-github-status@v3
- id: dump-context
name: Dump context
uses: crazy-max/ghaction-dump-context@v2
lint:
# Checks out the source and runs pre-commit hooks. Detects coding errors
# and style deviations.
name: "Lint sources"
name: Lint sources
needs:
- diagnostics
runs-on: ubuntu-latest
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- id: setup-env
uses: cisagov/setup-env-github-action@develop
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -104,11 +128,26 @@ jobs:
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
- name: Install go-critic
env:
PACKAGE_URL: github.com/go-critic/go-critic/cmd/gocritic
PACKAGE_VERSION: ${{ steps.setup-env.outputs.go-critic-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install gosec
env:
PACKAGE_URL: github.com/securego/gosec/v2/cmd/gosec
PACKAGE_VERSION: ${{ steps.setup-env.outputs.gosec-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install shfmt
env:
PACKAGE_URL: mvdan.cc/sh/v3/cmd/shfmt
PACKAGE_VERSION: ${{ steps.setup-env.outputs.shfmt-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install staticcheck
env:
PACKAGE_URL: honnef.co/go/tools/cmd/staticcheck
PACKAGE_VERSION: ${{ steps.setup-env.outputs.staticcheck-version }}
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install Terraform-docs
env:
PACKAGE_URL: github.com/terraform-docs/terraform-docs
Expand Down Expand Up @@ -166,15 +205,22 @@ jobs:
# with the value specified by the user.
#
# Scheduled builds are tagged with `:nightly`.
name: "Prepare build variables"
runs-on: ubuntu-latest
name: Prepare build variables
needs:
- diagnostics
outputs:
created: ${{ steps.prep.outputs.created }}
repometa: ${{ steps.repo.outputs.result }}
source_version: ${{ steps.prep.outputs.source_version }}
tags: ${{ steps.prep.outputs.tags }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- name: Gather repository metadata
id: repo
uses: actions/github-script@v6
Expand Down Expand Up @@ -228,16 +274,23 @@ jobs:
build:
# Builds a single test image for the native platform. This image is saved
# as an artifact and loaded by the test job.
name: "Build test image"
name: Build test image
needs:
- diagnostics
- prepare
runs-on: ubuntu-latest
needs: [prepare]
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
env:
Expand Down Expand Up @@ -298,11 +351,18 @@ jobs:
if: env.RUN_TMATE
test:
# Executes tests on the single-platform image created in the "build" job.
name: "Test image"
name: Test image
needs:
- diagnostics
- build
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -344,32 +404,41 @@ jobs:
# GitHub Container Registry. The contents of README.md are pushed as the
# image's description to Docker Hub. This job is skipped when the
# triggering event is a pull request.
name: "Build and push all platforms"
runs-on: ubuntu-latest
needs: [lint, prepare, test]
if: github.event_name != 'pull_request'
name: Build and push all platforms
needs:
- diagnostics
- lint
- prepare
- test
# When Dependabot creates a PR it requires this permission in
# order to push Docker images to ghcr.io.
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
env:
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: CodeQL

on:
push:
Expand All @@ -20,8 +20,27 @@ on:
- cron: '0 21 * * 6'

jobs:
diagnostics:
name: Run diagnostics
runs-on: ubuntu-latest
steps:
# Note that a duplicate of this step must be added at the top of
# each job.
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- id: github-status
name: Check GitHub status
uses: crazy-max/ghaction-github-status@v3
- id: dump-context
name: Dump context
uses: crazy-max/ghaction-dump-context@v2
analyze:
name: Analyze
needs:
- diagnostics
runs-on: ubuntu-latest
permissions:
# required for all workflows
Expand All @@ -37,8 +56,14 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Sync repository labels
if: success()
uses: crazy-max/ghaction-github-labeler@v4
uses: crazy-max/ghaction-github-labeler@v5
with:
# This is a hideous ternary equivalent so we only do a dry run unless
# this workflow is triggered by the develop branch.
Expand Down
Loading