Skip to content

Commit

Permalink
fix: add automatic tagging to action metadata for GHCR (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro authored Dec 29, 2020
1 parent 4ef6fa4 commit 9237b83
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 26 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,7 @@ jobs:
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Major Version Tag
if: steps.semantic.outputs.new_release_published == 'true'
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -287,5 +282,11 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache
tags: >-
ghcr.io/${{ github.repository }}:latest,
ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }},
ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }}.${{ steps.semantic.outputs.new_release_patch_version }}
ghcr.io/${{ github.repository }}:v${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }},
ghcr.io/${{ github.repository }}:v${{ steps.semantic.outputs.new_release_major_version }}.${{ steps.semantic.outputs.new_release_minor_version }}.${{ steps.semantic.outputs.new_release_patch_version }}
- name: Update Major Version Tag
if: steps.semantic.outputs.new_release_published == 'true'
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test-rulesets/repolinter-test.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"axioms": {
"linguist":"language",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-rulesets/repolinter-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"$schema": https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json
"$schema": https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json
version: 2
axioms:
linguist: language
Expand Down
9 changes: 6 additions & 3 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/github",
["@semantic-release/exec", {
"prepareCmd": "sed -i \"s\/image:\\s*[\\\"\\']\\?[^\\\"\\'[:space:]]\\+[\\\"\\']\\?\/image: docker:\\\/\\\/ghcr.io\\\/newrelic\\\/repolinter-action:${nextRelease.gitTag}\/\" action.yml"
}],
["@semantic-release/npm", {
"npmPublish": false
}],
["@semantic-release/git", {
"assets": ["dist/*", "CHANGELOG.md", "package.json", "package-lock.json"],
"assets": ["dist/*", "CHANGELOG.md", "package.json", "package-lock.json", "action.yml"],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}]
}],
"@semantic-release/github"
],
"dryRun": false,
"debug": true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,4 @@ If you have any questions, or to execute our corporate CLA, required if your con

repolinter-action is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.

> This repo also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.
> This repo also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the [third-party-notices](./THIRD_PARTY_NOTICES.md) document.
2 changes: 1 addition & 1 deletion __tests__/invalidsyntaxtestconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"the-axioms": {
"linguist":"language",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/invalidsyntaxtestconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
asdasd
"$schema": https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json
"$schema": https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json
version: 2
axioms:
linguist: language
Expand Down
2 changes: 1 addition & 1 deletion __tests__/invalidtestconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"the-axioms": {
"linguist":"language",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/invalidtestconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"$schema": https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json
"$schema": https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json
version: 2
axioms:
linguist: language
Expand Down
2 changes: 1 addition & 1 deletion __tests__/passingtestconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"axioms": {
"linguist":"language",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/testconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"axioms": {
"linguist":"language",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/testconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"$schema": https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json
"$schema": https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json
version: 2
axioms:
linguist: language
Expand Down
2 changes: 1 addition & 1 deletion __tests__/testfolder/nestedtestconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/prototypicalpro/repolinter/master/rulesets/schema.json",
"$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json",
"version": 2,
"axioms": {},
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion third_party_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lastUpdated": "Mon Dec 28 2020 20:10:34 GMT+0000 (Coordinated Universal Time)",
"lastUpdated": "Tue Dec 29 2020 01:04:47 GMT+0000 (Coordinated Universal Time)",
"projectName": "repolinter-action",
"projectUrl": "https://github.com/newrelic/repolinter-action",
"includeDev": true,
Expand Down

0 comments on commit 9237b83

Please sign in to comment.