Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsam committed Feb 7, 2024
1 parent d931d10 commit d0052f5
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 30 deletions.
9 changes: 9 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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: 1 addition & 1 deletion .github/workflows/add-labels-standardized.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'add labels standardized'
name: add labels standardized

on:
issues:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/add-to-project-garage-dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: 'add to project garage dependabot'
name: add to project garage dependabot

on:
pull_request:
branches: [main]

jobs:

add-to-project-dependabot:
secrets:
SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@main
uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v1
with:
project: ${{ vars.SENZING_PROJECT_GARAGE }}
9 changes: 5 additions & 4 deletions .github/workflows/add-to-project-garage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'add to project garage'
name: add to project garage

on:
issues:
Expand All @@ -8,11 +8,12 @@ on:

jobs:
add-to-project:
name: Add issue to project
name: add issue to project
runs-on: ubuntu-latest

steps:
- name: Assign issue to project
- name: assign issue to project
uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/projects/${{ vars.SENZING_PROJECT_GARAGE }}
github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }}
project-url: https://github.com/orgs/${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/projects/${{ vars.SENZING_PROJECT_GARAGE }}
6 changes: 4 additions & 2 deletions .github/workflows/dependabot-approve-and-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: dependabot-approve-and-merge.yaml
name: dependabot approve and merge

on:
pull_request:
branches: [main]

jobs:
dependabot-approve-and-merge:
permissions:
contents: write
pull-requests: write
uses: Senzing/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@main
secrets:
SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN: ${{ secrets.SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@v1
9 changes: 6 additions & 3 deletions .github/workflows/docker-build-container.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: docker-build-container.yaml
name: docker build container

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
docker-build-container:
runs-on: ubuntu-latest

steps:
- name: Build docker image
uses: Senzing/github-action-docker-buildx-build@latest
- name: build docker image
uses: senzing-factory/github-action-docker-buildx-build@v1
with:
image-repository: senzing/test
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/docker-push-containers-to-dockerhub.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: docker-push-containers-to-dockerhub.yaml
name: docker push containers to dockerhub

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
docker-push-containers-to-dockerhub:
runs-on: ubuntu-latest

steps:
- name: Build docker image and push to DockerHub
uses: Senzing/github-action-docker-buildx-build@latest
- name: build docker image and push to DockerHub
uses: senzing-factory/github-action-docker-buildx-build@v1
with:
build-options: "--push"
image-repository: senzing/test
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/lint-workflows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: lint workflows

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

permissions:
contents: read
packages: read
statuses: write

jobs:
lint-workflows:
uses: senzing-factory/build-resources/.github/workflows/lint-workflows.yaml@v1
27 changes: 13 additions & 14 deletions .github/workflows/sign-container.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Docker
name: sign container

on:
release:
types: [published]
Expand All @@ -11,10 +12,8 @@ env:
# github.repository as <account>/<repo>
IMAGE_NAME: senzing/test


jobs:
build:

sign-container:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -24,23 +23,23 @@ jobs:
id-token: write

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

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
- name: install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@main


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
- name: setup Docker buildx
uses: docker/setup-buildx-action@edfb0fe6204400c56fbfd3feba3fe9ad1adfa345

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry
- name: log into registry
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
Expand All @@ -49,7 +48,7 @@ jobs:

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
- name: extract Docker metadata
id: meta
uses: docker/metadata-action@v5.5.1
with:
Expand All @@ -60,19 +59,19 @@ jobs:
type=semver,pattern={{version}}
flavor: |
latest=false
- name: Build and push Docker image for github release
- name: build and push Docker image for GitHub release
id: build-and-push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign the Docker image on push

- name: sign the Docker image on push
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: cosign sign ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
run: cosign sign ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}

0 comments on commit d0052f5

Please sign in to comment.