From 1460b6a14ddd1ac393bfbf4f45b7c143768f87a0 Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Mon, 17 Aug 2020 10:47:08 +0100 Subject: [PATCH] Forgotten Bump (#108) * Forgotten Bump * Changing Workflow Job * :wrench: Fix automation due to label changes Signed-off-by: Luke Tainton Co-authored-by: Luke Tainton --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/document_issue.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/issue-branch.yml | 20 ++++++------ .github/workflows/autobranch.yml | 2 -- .github/workflows/deploy.yml | 40 +++++++++++------------ .github/workflows/stale.yml | 4 +-- 7 files changed, 34 insertions(+), 38 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 95f837d..02b5796 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '🐛' -labels: type/bug +labels: type:bug assignees: --- diff --git a/.github/ISSUE_TEMPLATE/document_issue.md b/.github/ISSUE_TEMPLATE/document_issue.md index 6faf7db..9e7d60f 100644 --- a/.github/ISSUE_TEMPLATE/document_issue.md +++ b/.github/ISSUE_TEMPLATE/document_issue.md @@ -2,7 +2,7 @@ name: Document request about: Request a change to documentation title: '📚' -labels: type/docs +labels: type:docs assignees: --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 8ce8220..3d2caf7 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '✨' -labels: type/feature +labels: type:feature assignees: --- diff --git a/.github/issue-branch.yml b/.github/issue-branch.yml index b677a91..6b49f73 100644 --- a/.github/issue-branch.yml +++ b/.github/issue-branch.yml @@ -2,14 +2,14 @@ mode: auto silent: false branchName: '${issue.number}' branches: - - label: type/feature - prefix: feat/ - - label: type/bug - prefix: bug/ - - label: type/epic - prefix: epic/ - - label: type/docs - prefix: docs/ - - label: type/automation - prefix: auto/ + - label: type:feature + prefix: feat- + - label: type:bug + prefix: bug- + - label: type:epic + prefix: epic- + - label: type:docs + prefix: docs- + - label: type:automation + prefix: auto- autoCloseIssue: true diff --git a/.github/workflows/autobranch.yml b/.github/workflows/autobranch.yml index 4ed3855..d164ef7 100644 --- a/.github/workflows/autobranch.yml +++ b/.github/workflows/autobranch.yml @@ -3,8 +3,6 @@ name: Auto-create branches on: issues: types: [assigned] - issue_comment: - types: [created] jobs: create_issue_branch_job: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 544c3ba..01081fe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,28 +4,26 @@ on: branches: main jobs: - bump-version: - name: Bump version number + release-on-push: runs-on: ubuntu-latest outputs: - ver: ${{ steps.ver.outputs.version }} + ver: ${{ steps.release.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - id: bump - uses: zwaldowski/match-label-action@v1 - with: - allowed: > - major - minor - patch - - id: ver - uses: zwaldowski/semver-release-action@v1 - with: - bump: ${{ steps.bump.outputs.match }} - github_token: ${{ secrets.GITHUB_TOKEN }} + - id: release + uses: rymndhng/release-on-push-action@master + with: + bump_version_scheme: minor + + - name: Check Output Parameters + run: | + echo "Got tag name ${{ steps.release.outputs.tag_name }}" + echo "Got release version ${{ steps.release.outputs.version }}" docker-dh: name: Push to Docker Hub - needs: [bump-version] + needs: [release-on-push] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -33,18 +31,18 @@ jobs: run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Build image for Docker Hub env: - VERSION: ${{ needs.bump-version.output.ver }} + VERSION: ${{ needs.release-on-push.output.ver }} run: docker build . --file Dockerfile --tag luketainton/fhed:$VERSION luketainton/fhed:latest - name: Push image to Docker Hub env: - VERSION: ${{ needs.bump-version.output.ver }} + VERSION: ${{ needs.release-on-push.output.ver }} run: | docker push luketainton/fhed:$VERSION && docker push luketainton/fhed:latest docker-ghr: name: Push to GitHub Package Registry - needs: [bump-version] + needs: [release-on-push] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -52,11 +50,11 @@ jobs: run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u luketainton --password-stdin - name: Build image for GitHub Package Registry env: - VERSION: ${{ needs.bump-version.output.ver }} + VERSION: ${{ needs.release-on-push.output.ver }} run: docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/fhed/fhed:latest docker.pkg.github.com/luketainton/fhed/fhed:$VERSION - name: Push image to GitHub Package Registry env: - VERSION: ${{ needs.bump-version.output.ver }} + VERSION: ${{ needs.release-on-push.output.ver }} run: | docker push docker.pkg.github.com/luketainton/fhed/fhed:$VERSION && docker push docker.pkg.github.com/luketainton/fhed/fhed:latest diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 6667465..fe2842b 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,5 +15,5 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This issue has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.' stale-pr-message: 'This pull request has been marked as stale due to inactivity. If this issue is still ongoing, please leave a comment.' - stale-issue-label: 'status/stale' - stale-pr-label: 'status/stale' + stale-issue-label: 'status:stale' + stale-pr-label: 'status:stale'