Skip to content

Prepare application for GitHub Action#31

Merged
mszostok merged 6 commits into
masterfrom
add-action-support
Mar 29, 2020
Merged

Prepare application for GitHub Action#31
mszostok merged 6 commits into
masterfrom
add-action-support

Conversation

@mszostok
Copy link
Copy Markdown
Owner

@mszostok mszostok commented Mar 29, 2020

Description

Changes proposed in this pull request:

  • Add support for building docker images
    Such images are published when new release is created:

    • mszostok/codeowners-validator:latest
    • mszostok/codeowners-validator:v{{ .Major }}.{{ .Minor }}.{{ .Patch}}
    • mszostok/codeowners-validator:v{{ .Major }}.{{ .Minor }}
  • Add images compression by upx --brute
    Thanks to that the binary size is reduced from ~10MB to ~1.9MB for each platform.

  • Fix not owned file checker
    When the .gitingore has no new line then the ignored pattern was added in the same line and it was not applied by git, so we had false negative.

  • Add support for defining env prefix
    This feature was need as the GitHub Actions are injecting envs with INPUT prefix, e.g. INPUT_CHECKS.

  • ⚠️ Change query for getting org teams
    Change requires also repository name. Because of that the OWNER_CHECKER_ORGANIZATION_NAME env was replaced by OWNER_CHECKER_REPOSITORY. More information in README.md file.

    Previously we used: https://developer.github.com/v3/teams/#list-teams
    Now we are using such query: https://developer.github.com/v3/repos/#list-teams

Such images are published when new release is created:
      - "mszostok/codeowners-validator:latest"
      - "mszostok/codeowners-validator:v{{ .Major }}.{{ .Minor }}.{{ .Patch}}"
      - "mszostok/codeowners-validator:v{{ .Major }}.{{ .Minor }}"
Thanks to that the binary size is reduced from ~10MB to ~1.9MB for each platform.
When the .gitingore has no new line thet the ignored pattern was added in the same line and it was not applied by git, so we had false negative.
This feature was need as the GitHub Actions are injecting envs with `INPUT` prefix, e.g. INPUT_CHECKS.
@mszostok mszostok force-pushed the add-action-support branch from 491d2e3 to 8eadaa6 Compare March 29, 2020 11:59
Change requires also repository name. Because of that the `OWNER_CHECKER_ORGANIZATION_NAME` env was replaced by `OWNER_CHECKER_REPOSITORY`. More information in README.md file.

Previously we used: https://developer.github.com/v3/teams/#list-teams
Now we are using such query: https://developer.github.com/v3/repos/#list-teams

As a result we reduce numbers of queries.
@mszostok mszostok force-pushed the add-action-support branch from 8eadaa6 to e1a1d13 Compare March 29, 2020 12:13
@mszostok mszostok added the enhancement New feature or request label Mar 29, 2020
@mszostok mszostok added this to the Upcoming - Minor milestone Mar 29, 2020
@mszostok mszostok merged commit d18c45d into master Mar 29, 2020
@mszostok mszostok deleted the add-action-support branch March 29, 2020 12:37
@mszostok mszostok removed this from the Next milestone May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant