Skip to content

Commit

Permalink
#63 post migration cleanup (#73)
Browse files Browse the repository at this point in the history
* #70 remove garage project

* update org vars

* revert change

* cleanup

* cleanup

* cleanup

* tmp test

* add yamllint

* standardization, remove doc start

* add default yamllint config

* make linter reusable

* cleanup
  • Loading branch information
kernelsam authored Jan 9, 2024
1 parent 650efc2 commit 1d0c93f
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 227 deletions.
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/documentation_request.md

This file was deleted.

19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

# Extends the default yamllint config by adjusting some options.
extends: default

rules:
comments-indentation: disable
line-length:
level: warning
allow-non-breakable-inline-mappings: true
truthy: disable
2 changes: 0 additions & 2 deletions .github/workflows/add-labels-to-issue.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

name: 'add labels to issue'

on:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/add-to-project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

name: 'add to project'

on:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/dependabot-approve-and-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

name: 'dependabot approve and merge'

on:
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/dependabot-automation.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
---

name: dependabot automation
name: 'dependabot automation'

on:
pull_request:
branches: [main]

jobs:

add-pr-to-community:
if: ${{ github.actor == 'dependabot[bot]' && ( github.event.action == 'opened' || github.event.action == 'reopened' ) }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project.yaml@main
with:
project-number: "2"
classic: true
secrets:
SENZING_GITHUB_ACCESS_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}

add-pr-to-devsecops:
add-pr-to-project:
if: ${{ github.actor == 'dependabot[bot]' && ( github.event.action == 'opened' || github.event.action == 'reopened' ) }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project.yaml@main
with:
project-number: "13"
classic: false
org: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}
project-number: ${{ vars.SENZING_PROJECT_FACTORY }}
secrets:
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}

Expand Down
166 changes: 82 additions & 84 deletions .github/workflows/docker-push-containers-to-dockerhub-and-ecr.yaml
Original file line number Diff line number Diff line change
@@ -1,96 +1,94 @@
---

name: 'docker-push-containers-to-dockerhub-and-ecr'

on:
workflow_call:
inputs:
build-options:
description: Additional options to pass to docker buildx build
type: string
context:
default: "."
description: Context (directory) of the docker build process
type: string
docker-image-repository:
description: Docker repository (e.g. senzing/senzingapi-runtime)
required: true
type: string
docker-registry-server:
default: docker.io
description: Docker registry server
type: string
ecr-image-repository:
description: ECR repository (e.g. senzing/senzingapi-runtime)
required: true
type: string
image-tag:
default: latest
description: Docker image tag
type: string
platforms:
default: "linux/amd64"
type: string
workflow_call:
inputs:
build-options:
description: Additional options to pass to docker buildx build
type: string
context:
default: "."
description: Context (directory) of the docker build process
type: string
docker-image-repository:
description: Docker repository (e.g. senzing/senzingapi-runtime)
required: true
type: string
docker-registry-server:
default: docker.io
description: Docker registry server
type: string
ecr-image-repository:
description: ECR repository (e.g. senzing/senzingapi-runtime)
required: true
type: string
image-tag:
default: latest
description: Docker image tag
type: string
platforms:
default: "linux/amd64"
type: string

secrets:
AWS_DOCKER_ACCOUNT_ID:
required: true
DOCKERHUB_ACCESS_TOKEN:
required: true
DOCKERHUB_USERNAME:
required: true
secrets:
AWS_DOCKER_ACCOUNT_ID:
required: true
DOCKERHUB_ACCESS_TOKEN:
required: true
DOCKERHUB_USERNAME:
required: true

jobs:
docker-push-containers-to-dockerhub-and-ecr:
runs-on: ubuntu-latest
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: recursive
docker-push-containers-to-dockerhub-and-ecr:
runs-on: ubuntu-latest
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: recursive

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
env:
AWS_REGION: "us-east-1"
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_DOCKER_ACCOUNT_ID }}:role/github-actions-ecr-push
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
env:
AWS_REGION: "us-east-1"
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_DOCKER_ACCOUNT_ID }}:role/github-actions-ecr-push
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public

- name: Docker build images
shell: bash
env:
ECR_REGISTRY_SERVER: ${{ steps.login-ecr-public.outputs.registry }}
run: |
docker buildx build \
--push \
--platform ${{ inputs.platforms }} \
--tag ${{ inputs.docker-registry-server }}/${{ inputs.docker-image-repository }}:${{ inputs.image-tag }} \
--tag ${{ inputs.docker-registry-server }}/${{ inputs.docker-image-repository }}:latest \
--tag ${{ env.ECR_REGISTRY_SERVER }}/${{ inputs.ecr-image-repository }}:${{ inputs.image-tag }} \
--tag ${{ env.ECR_REGISTRY_SERVER }}/${{ inputs.ecr-image-repository }}:latest \
${{ inputs.build-options }} \
${{ inputs.context }}
- name: Docker build images
shell: bash
env:
ECR_REGISTRY_SERVER: ${{ steps.login-ecr-public.outputs.registry }}
run: |
docker buildx build \
--push \
--platform ${{ inputs.platforms }} \
--tag ${{ inputs.docker-registry-server }}/${{ inputs.docker-image-repository }}:${{ inputs.image-tag }} \
--tag ${{ inputs.docker-registry-server }}/${{ inputs.docker-image-repository }}:latest \
--tag ${{ env.ECR_REGISTRY_SERVER }}/${{ inputs.ecr-image-repository }}:${{ inputs.image-tag }} \
--tag ${{ env.ECR_REGISTRY_SERVER }}/${{ inputs.ecr-image-repository }}:latest \
${{ inputs.build-options }} \
${{ inputs.context }}
2 changes: 0 additions & 2 deletions .github/workflows/gofmt.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

name: 'gofmt'

on: [workflow_call]
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/issue-automation.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

name: 'issue automation'

on:
Expand All @@ -11,7 +9,7 @@ on:
jobs:

add-issue-to-project:
uses: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/build-resources/.github/workflows/add-to-project.yaml@v1
uses: senzing-factory/build-resources/.github/workflows/add-to-project.yaml@main
with:
project-number: ${{ vars.SENZING_PROJECT_FACTORY }}
org: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}
Expand All @@ -20,7 +18,7 @@ jobs:
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}

add-issue-labels:
uses: ${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/build-resources/.github/workflows/add-labels-to-issue.yaml@v1
uses: senzing-factory/build-resources/.github/workflows/add-labels-to-issue.yaml@main
secrets:
ORG_MEMBERSHIP_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }}
SENZING_MEMBERS: ${{ secrets.SENZING_MEMBERS }}
11 changes: 11 additions & 0 deletions .github/workflows/lint-repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'lint repo'

on:
push:
branches-ignore: [main]
pull_request:
branches: [main]

jobs:
lint-code-base:
uses: senzing-factory/build-resources/.github/workflows/linter.yaml@main
Loading

0 comments on commit 1d0c93f

Please sign in to comment.