From 4b28adb78bb6ea5b65098ee39de4d379eb21821c Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Thu, 18 Jan 2024 12:59:38 -0800 Subject: [PATCH] senzing-factory/build-resources#79 add .github owner (#8) * senzing-factory/build-resources#79 add .github owner * use standardized docker builds --- .github/CODEOWNERS | 3 +++ .github/workflows/cd-pr-test-build.yml | 22 ------------------- .github/workflows/ci-test-build.yml | 21 ------------------ .github/workflows/docker-build-container.yaml | 18 +++++++++++++++ 4 files changed, 21 insertions(+), 43 deletions(-) create mode 100644 .github/CODEOWNERS delete mode 100644 .github/workflows/cd-pr-test-build.yml delete mode 100644 .github/workflows/ci-test-build.yml create mode 100644 .github/workflows/docker-build-container.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ae4b73b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Default code owner + +* @senzing-factory/senzing-devsecops diff --git a/.github/workflows/cd-pr-test-build.yml b/.github/workflows/cd-pr-test-build.yml deleted file mode 100644 index 294f1da..0000000 --- a/.github/workflows/cd-pr-test-build.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Pull Request Locally Test Merge Into Master - -on: - pull_request: - branches: - - master - -jobs: - buildTestlocallyMergeMasterIntoBranch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Print Environment Variables - run: printenv - - name: Build Docker Image - id: build_docker_image - run: | - docker build --tag git-action-git-issue-creation:${GITHUB_HEAD_REF:-${GITHUB_REF##*/}} \ - --build-arg "GITHUB_HEAD_REF=${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}" \ - --build-arg "GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}" \ - build/docker - diff --git a/.github/workflows/ci-test-build.yml b/.github/workflows/ci-test-build.yml deleted file mode 100644 index 3f2b5d3..0000000 --- a/.github/workflows/ci-test-build.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: CI Test Build On Push Event For A Commit - -on: - push: - branches-ignore: - - master - -jobs: - ciTestBuildOnBranch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Print Environment Variables - run: printenv - - name: Build Docker Image - id: build_docker_image - run: | - docker build --tag git-action-git-issue-creation:${GITHUB_HEAD_REF:-${GITHUB_REF##*/}} \ - --build-arg "GITHUB_HEAD_REF=${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}" \ - --build-arg "GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}" \ - build/docker diff --git a/.github/workflows/docker-build-container.yaml b/.github/workflows/docker-build-container.yaml new file mode 100644 index 0000000..191e175 --- /dev/null +++ b/.github/workflows/docker-build-container.yaml @@ -0,0 +1,18 @@ +name: 'docker build container' + +on: [push] + +jobs: + docker-build-container: + runs-on: ubuntu-latest + steps: + - name: Build docker image + uses: Senzing/github-action-docker-buildx-build@v1 + with: + build-options: "--build-arg \"GITHUB_HEAD_REF=${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}\" \ + --build-arg \"GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME}\" " + context: build/docker + image-repository: senzing-factory/git-action-git-issue-creation + image-tag: ${{ github.ref_name }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }}