From b86af7896b44720b0b9cd0b219d80b3486f257a9 Mon Sep 17 00:00:00 2001 From: Spencer Perkins <95900100+SpecialThing44@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:10:53 -0400 Subject: [PATCH 1/4] Imagine some ci --- .dockerignore | 4 +- .github/workflows/ci.yml | 91 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.dockerignore b/.dockerignore index 9c9bd57..74a63f3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ -#*/ +* +!index* +!Caddyfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dbbad9e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,91 @@ +name: Image CI +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +env: + artifact_registry: us-central1-docker.pkg.dev + artifact_repository: polished-enigma-247013/images + image_name: maintenance + +concurrency: + group: ${{ github.workflow_ref }}-${{ github.actor }} + cancel-in-progress: true + +jobs: + image: + name: Build and Push Image + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout for pushing to protected branch + uses: actions/checkout@v4 + id: checkout-protected + if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch + with: + ssh-key: "${{ secrets.CHECK_SPELLING }}" + + - name: Checkout + uses: actions/checkout@v4 + if: steps.checkout-protected.conclusion == 'skipped' + + - name: Authenticate to Google Cloud + id: auth-work-identity + uses: "google-github-actions/auth@v2" + with: + workload_identity_provider: "projects/552057127791/locations/global/workloadIdentityPools/github/providers/github" + service_account: "container-builder@helical-crowbar-220917.iam.gserviceaccount.com" + + - name: Get version + id: get-version + if: steps.checkout-protected.conclusion == 'skipped' + shell: bash + run: | + version=$(head -1 version) + echo "version=$version" >> $GITHUB_OUTPUT + - name: Bump version + id: bump-version + uses: garnercorp/build-actions/bump-version@main + if: steps.checkout-protected.conclusion != 'skipped' + with: + version-type: raw + version-file-path: version + git-name: "jenkins" + git-email: "jenkins@garnercorp.com" + major: changelogs/major + minor: changelogs/minor + + - name: Build and Push Docker Image + id: build + uses: garnercorp/build-actions/image@main + env: + version: ${{ steps.get-version.outputs.version || steps.bump-version.outputs.version }} + with: + container-registry: ${{ env.artifact_registry }} + container-project: ${{ secrets.PROJECT_ID }} + image-name: ${{ env.image_name }} + rc-tag: ${{ env.version }} + image-tag: ${{ env.version }} + additional-image-tags: | + ${{ env.artifact_registry }}/${{ env.artifact_repository }}/${{ env.image_name }}:rc-${{ github.sha }} + - name: Copy image to extra repositories + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + uses: GarnerCorp/build-actions/copy-image@main + env: + rest: >- + ${{ steps.bump-version.outputs.version && format('images/{0}:prod-{1}', env.image_name, steps.bump-version.outputs.version) || + format('images/{0}:rc-{1}-{2}', env.image_name, steps.get-version.outputs.version, github.sha) }} + with: + source: ${{ steps.build.outputs.image }} + destinations: >- + ${{ format('{0}/{1}', secrets.ARTIFACT_REPOSITORY_1, env.rest) }} + ${{ format('{0}/{1}', secrets.ARTIFACT_REPOSITORY_2, env.rest) }} + ${{ format('{0}/{1}', secrets.ARTIFACT_REPOSITORY_3, env.rest) }} + ${{ format('{0}/{1}', secrets.ARTIFACT_REPOSITORY_4, env.rest) }} From 7af4676ef007476293168a1a3e04731039fff76b Mon Sep 17 00:00:00 2001 From: Spencer Perkins <95900100+SpecialThing44@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:43:36 -0400 Subject: [PATCH 2/4] Add changelogs and version file --- changelogs/major/.keep | 0 changelogs/minor/.keep | 0 version | 1 + 3 files changed, 1 insertion(+) create mode 100644 changelogs/major/.keep create mode 100644 changelogs/minor/.keep create mode 100644 version diff --git a/changelogs/major/.keep b/changelogs/major/.keep new file mode 100644 index 0000000..e69de29 diff --git a/changelogs/minor/.keep b/changelogs/minor/.keep new file mode 100644 index 0000000..e69de29 diff --git a/version b/version new file mode 100644 index 0000000..8a9ecc2 --- /dev/null +++ b/version @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file From f397b437aeffbf58bc760e7ec8b3e69069d4da00 Mon Sep 17 00:00:00 2001 From: Spencer Perkins <95900100+SpecialThing44@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:37:20 -0400 Subject: [PATCH 3/4] updating check-spelling metadata --- .github/actions/spelling/excludes.txt | 5 +++-- .github/actions/spelling/patterns.txt | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index d84bbd6..9d7f4d1 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -3,14 +3,14 @@ (?:^|/)(?i)LICEN[CS]E (?:^|/)(?i)third[-_]?party/ (?:^|/)3rdparty/ +(?:^|/)\.keep$ (?:^|/)generated/ (?:^|/)go\.sum$ (?:^|/)package(?:-lock|)\.json$ (?:^|/)Pipfile$ (?:^|/)pyproject.toml -(?:^|/|\b)requirements(?:-dev|-doc|-test|)\.txt$ (?:^|/)vendor/ -ignore$ +(?:^|/|\b)requirements(?:-dev|-doc|-test|)\.txt$ \.a$ \.ai$ \.all-contributorsrc$ @@ -82,3 +82,4 @@ ignore$ \.zip$ ^\.github/actions/spelling/ ^\Q.github/workflows/spelling.yml\E$ +ignore$ diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt index 470a2df..52f4df6 100644 --- a/.github/actions/spelling/patterns.txt +++ b/.github/actions/spelling/patterns.txt @@ -8,6 +8,10 @@ gtag\(.*\) # https/http/file urls (?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|] +# hit-count: 2 file-count: 1 +# GitHub actions +\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+ + # Questionably acceptable forms of `in to` # Personally, I prefer `log into`, but people object # https://www.tprteaching.com/log-into-log-in-to-login/ @@ -53,3 +57,4 @@ gtag\(.*\) # ignore long runs of a single character: \b([A-Za-z])\g{-1}{3,}\b + From 677f1386c2fd418bd934225b67d2d65284129912 Mon Sep 17 00:00:00 2001 From: Spencer Perkins Date: Fri, 25 Apr 2025 14:44:09 +0000 Subject: [PATCH 4/4] [check-spelling] Update metadata Update for https://github.com/GarnerCorp/maintenance/actions/runs/14667173465/attempts/1 Accepted in https://github.com/GarnerCorp/maintenance/pull/2#issuecomment-2830634974 Signed-off-by: check-spelling-bot on-behalf-of: @check-spelling --- .github/actions/spelling/expect.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 5f439e6..0e9e46c 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1 +1,7 @@ Caddyfile +garnercorp +google +iam +jenkins +workflows +yml