Skip to content

Commit e5682ce

Browse files
authored
Merge pull request #58 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents 7fd446f + dc54890 commit e5682ce

10 files changed

+183
-73
lines changed

.github/dependabot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ updates:
1717
schedule:
1818
interval: "weekly"
1919
ignore:
20+
# Managed by cisagov/skeleton-generic
2021
- dependency-name: actions/cache
2122
- dependency-name: actions/checkout
23+
- dependency-name: actions/setup-go
2224
- dependency-name: actions/setup-python
25+
- dependency-name: hashicorp/setup-terraform
26+
- dependency-name: mxschmitt/action-tmate
2327
# Managed by cisagov/skeleton-docker
2428
- dependency-name: actions/download-artifact
2529
- dependency-name: actions/github-script
@@ -28,6 +32,7 @@ updates:
2832
- dependency-name: docker/login-action
2933
- dependency-name: docker/setup-buildx-action
3034
- dependency-name: docker/setup-qemu-action
35+
- dependency-name: github/codeql-action
3136

3237
- package-ecosystem: "pip"
3338
directory: "/"

.github/labels.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
# Rather than breaking up descriptions into multiline strings we disable that
3+
# specific rule in yamllint for this file.
4+
# yamllint disable rule:line-length
5+
- color: "eb6420"
6+
description: This issue or pull request is awaiting the outcome of another issue or pull request
7+
name: blocked
8+
- color: "000000"
9+
description: This issue or pull request involves changes to existing functionality
10+
name: breaking change
11+
- color: "d73a4a"
12+
description: This issue or pull request addresses broken functionality
13+
name: bug
14+
- color: "07648d"
15+
description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks)
16+
name: code.gov
17+
- color: "0366d6"
18+
description: Pull requests that update a dependency file
19+
name: dependencies
20+
- color: "2497ed"
21+
description: Pull requests that update Docker code
22+
name: docker
23+
- color: "5319e7"
24+
description: This issue or pull request improves or adds to documentation
25+
name: documentation
26+
- color: "cfd3d7"
27+
description: This issue or pull request already exists or is covered in another issue or pull request
28+
name: duplicate
29+
- color: "b005bc"
30+
description: A high-level objective issue encompassing multiple issues instead of a specific unit of work
31+
name: epic
32+
- color: "000000"
33+
description: Pull requests that update GitHub Actions code
34+
name: github-actions
35+
- color: "0e8a16"
36+
description: This issue or pull request is well-defined and good for newcomers
37+
name: good first issue
38+
- color: "ff7518"
39+
description: Pull request that should count toward Hacktoberfest participation
40+
name: hacktoberfest-accepted
41+
- color: "a2eeef"
42+
description: This issue or pull request will add or improve functionality, maintainability, or ease of use
43+
name: improvement
44+
- color: "fef2c0"
45+
description: This issue or pull request is not applicable, incorrect, or obsolete
46+
name: invalid
47+
- color: "ce099a"
48+
description: This pull request is ready to merge during the next Lineage Kraken release
49+
name: kraken 🐙
50+
- color: "a4fc5d"
51+
description: This issue or pull request requires further information
52+
name: need info
53+
- color: "fcdb45"
54+
description: This pull request is awaiting an action or decision to move forward
55+
name: on hold
56+
- color: "ef476c"
57+
description: This issue is a request for information or needs discussion
58+
name: question
59+
- color: "d73a4a"
60+
description: This issue or pull request addresses a security issue
61+
name: security
62+
- color: "00008b"
63+
description: This issue or pull request adds or otherwise modifies test code
64+
name: test
65+
- color: "1d76db"
66+
description: This issue or pull request pulls in upstream updates
67+
name: upstream update
68+
- color: "d4c5f9"
69+
description: This issue or pull request increments the version number
70+
name: version bump
71+
- color: "ffffff"
72+
description: This issue will not be incorporated
73+
name: wontfix

.github/workflows/build.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,24 @@ jobs:
4444
uses: cisagov/setup-env-github-action@develop
4545
- uses: actions/checkout@v3
4646
- id: setup-python
47-
uses: actions/setup-python@v3
47+
uses: actions/setup-python@v4
4848
with:
4949
python-version: "3.10"
5050
# We need the Go version and Go cache location for the actions/cache step,
5151
# so the Go installation must happen before that.
52-
- uses: actions/setup-go@v2
52+
- id: setup-go
53+
uses: actions/setup-go@v3
5354
with:
54-
go-version: "1.16"
55-
- name: Store installed Go version
56-
id: go-version
57-
run: |
58-
echo "::set-output name=version::"\
59-
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
55+
go-version: "1.19"
6056
- name: Lookup Go cache directory
6157
id: go-cache
6258
run: |
63-
echo "::set-output name=dir::$(go env GOCACHE)"
59+
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
6460
- uses: actions/cache@v3
6561
env:
6662
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
6763
py${{ steps.setup-python.outputs.python-version }}-\
68-
go${{ steps.go-version.outputs.version }}-\
64+
go${{ steps.setup-go.outputs.go-version }}-\
6965
packer${{ steps.setup-env.outputs.packer-version }}-\
7066
tf${{ steps.setup-env.outputs.terraform-version }}-"
7167
with:
@@ -101,7 +97,7 @@ jobs:
10197
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
10298
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
10399
sudo ln -s /opt/packer/packer /usr/local/bin/packer
104-
- uses: hashicorp/setup-terraform@v1
100+
- uses: hashicorp/setup-terraform@v2
105101
with:
106102
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
107103
- name: Install shfmt
@@ -177,7 +173,7 @@ jobs:
177173
- uses: actions/checkout@v3
178174
- name: Gather repository metadata
179175
id: repo
180-
uses: actions/github-script@v5
176+
uses: actions/github-script@v6
181177
with:
182178
script: |
183179
const repo = await github.rest.repos.get(context.repo)
@@ -218,9 +214,9 @@ jobs:
218214
do
219215
TAGS="${TAGS},ghcr.io/${i}"
220216
done
221-
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
222-
echo ::set-output name=source_version::$(./bump_version.sh show)
223-
echo ::set-output name=tags::${TAGS}
217+
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
218+
echo "source_version=$(./bump_version.sh show)" >> $GITHUB_OUTPUT
219+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
224220
echo tags=${TAGS}
225221
- name: Setup tmate debug session
226222
uses: mxschmitt/action-tmate@v3
@@ -251,7 +247,7 @@ jobs:
251247
run: mkdir -p dist
252248
- name: Build image
253249
id: docker_build
254-
uses: docker/build-push-action@v3
250+
uses: docker/build-push-action@v4
255251
with:
256252
build-args: |
257253
VERSION=${{ needs.prepare.outputs.source_version }}
@@ -304,9 +300,9 @@ jobs:
304300
steps:
305301
- uses: actions/checkout@v3
306302
- id: setup-python
307-
uses: actions/setup-python@v3
303+
uses: actions/setup-python@v4
308304
with:
309-
python-version: 3.9
305+
python-version: "3.10"
310306
- name: Cache testing environments
311307
uses: actions/cache@v3
312308
env:
@@ -348,6 +344,10 @@ jobs:
348344
runs-on: ubuntu-latest
349345
needs: [lint, prepare, test]
350346
if: github.event_name != 'pull_request'
347+
# When Dependabot creates a PR it requires this permission in
348+
# order to push Docker images to ghcr.io.
349+
permissions:
350+
packages: write
351351
steps:
352352
- name: Login to Docker Hub
353353
uses: docker/login-action@v2
@@ -379,7 +379,7 @@ jobs:
379379
run: ./buildx-dockerfile.sh
380380
- name: Build and push platform images to registries
381381
id: docker_build
382-
uses: docker/build-push-action@v3
382+
uses: docker/build-push-action@v4
383383
with:
384384
build-args: |
385385
VERSION=${{ needs.prepare.outputs.source_version }}

.github/workflows/codeql-analysis.yml

+20-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
# For most projects, this workflow file will not need changing; you simply need
43
# to commit it to your repository.
54
#
@@ -11,59 +10,58 @@ on:
1110
push:
1211
# Dependabot triggered push events have read-only access, but uploading code
1312
# scanning requires write access.
14-
branches-ignore: [dependabot/**]
13+
branches-ignore:
14+
- dependabot/**
1515
pull_request:
1616
# The branches below must be a subset of the branches above
17-
branches: [develop]
17+
branches:
18+
- develop
1819
schedule:
1920
- cron: '0 21 * * 6'
2021

2122
jobs:
2223
analyze:
2324
name: Analyze
2425
runs-on: ubuntu-latest
25-
26+
permissions:
27+
# required for all workflows
28+
security-events: write
2629
strategy:
2730
fail-fast: false
2831
matrix:
2932
# Override automatic language detection by changing the below list
30-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript',
31-
# 'python']
32-
language: ['python']
33+
# Supported options are go, javascript, csharp, python, cpp, and java
34+
language:
35+
- python
3336
# Learn more...
3437
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3538

3639
steps:
3740
- name: Checkout repository
38-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
3942

4043
# Initializes the CodeQL tools for scanning.
4144
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
45+
uses: github/codeql-action/init@v2
4346
with:
4447
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a
46-
# config file. By default, queries listed here will override any
47-
# specified in a config file. Prefix the list here with "+" to use
48-
# these queries and those in the config file. queries:
49-
# ./path/to/local/query, your-org/your-repo/queries@main
5048

51-
# Autobuild attempts to build any compiled languages (C/C++, C#, or
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or
5250
# Java). If this step fails, then you should remove it and run the build
53-
# manually (see below)
51+
# manually (see below).
5452
- name: Autobuild
55-
uses: github/codeql-action/autobuild@v1
53+
uses: github/codeql-action/autobuild@v2
5654

5755
# ℹ️ Command-line programs to run using the OS shell.
5856
# 📚 https://git.io/JvXDl
5957

6058
# ✏️ If the Autobuild fails above, remove it and uncomment the following
61-
# three lines and modify them (or add more) to build your code if your
62-
# project uses a compiled language
59+
# three lines and modify them (or add more) to build your code if your
60+
# project uses a compiled language
6361

6462
# - run: |
65-
# make bootstrap
66-
# make release
63+
# make bootstrap
64+
# make release
6765

6866
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@v1
67+
uses: github/codeql-action/analyze@v2

.github/workflows/sync-labels.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: sync-labels
3+
4+
on:
5+
push:
6+
paths:
7+
- '.github/labels.yml'
8+
- '.github/workflows/sync-labels.yml'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
labeler:
15+
permissions:
16+
# actions/checkout needs this to fetch code
17+
contents: read
18+
# crazy-max/ghaction-github-labeler needs this to manage repository labels
19+
issues: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Sync repository labels
24+
if: success()
25+
uses: crazy-max/ghaction-github-labeler@v4
26+
with:
27+
# This is a hideous ternary equivalent so we only do a dry run unless
28+
# this workflow is triggered by the develop branch.
29+
dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }}

.lgtm.yml

-8
This file was deleted.

0 commit comments

Comments
 (0)