Skip to content

Commit

Permalink
Merge pull request #146 from wishabi/fix-go-deps-action
Browse files Browse the repository at this point in the history
Chanbe order in Go deps to fix vendoring errors
  • Loading branch information
brad-rogan committed Nov 30, 2023
2 parents 898a1a4 + 1e7c5bf commit 90ed947
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
16 changes: 11 additions & 5 deletions deploy/eks/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "eks-deploy"
name: 'eks-deploy'
description: 'Custom GitHub action that deploys the repository to EKS using its "/deploy/build.sh" script'

inputs:
Expand Down Expand Up @@ -28,7 +28,7 @@ inputs:
required: false

runs:
using: "composite"
using: 'composite'
steps:
- name: Set branch variable
id: set-branch
Expand All @@ -41,9 +41,15 @@ runs:
branch="${branch#refs/heads/}"
fi
echo "branch=${branch}" >> $GITHUB_OUTPUT
- name: Get commit message
id: get-commit-msg
shell: bash
run: |
msg="${{ github.event.head_commit.message }}"
echo "msg=`echo "${msg}" | head -1`" >> $GITHUB_OUTPUT
- name: Get short sha
id: get-short-sha
run: echo "short_sha=`echo ${GITHUB_SHA::7}`" > $GITHUB_OUTPUT
run: echo "short_sha=`echo ${GITHUB_SHA::7}`" >> $GITHUB_OUTPUT
shell: bash
- name: Configuring AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down Expand Up @@ -131,7 +137,7 @@ runs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Commit Message*\n${{ github.event.head_commit.message }}"
"text": "*Commit Message*\n${{ steps.get-commit-msg.outputs.msg }}"
}
},
{
Expand Down Expand Up @@ -210,7 +216,7 @@ runs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Commit Message*\n${{ github.event.head_commit.message }}"
"text": "*Commit Message*\n${{ steps.get-commit-msg.outputs.msg }}"
}
},
{
Expand Down
30 changes: 15 additions & 15 deletions go/deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ inputs:
runs:
using: 'composite'
steps:
- name: Generating protobuf code
if: ${{ hashFiles('buf.gen.yaml') != '' }}
run: buf generate
shell: bash
- name: Run go generate
run: go generate ./...
shell: bash
- name: Install mockery
if: ${{ hashFiles('.mockery.yml') != '' }}
run: go install github.com/vektra/mockery/v2
shell: bash
- name: Generate mocks
if: ${{ hashFiles('.mockery.yml') != '' }}
run: mockery
shell: bash
- name: Restoring vendor modules from cache
id: vendor-cache
uses: actions/cache@v3
Expand All @@ -44,5 +29,20 @@ runs:
go mod tidy
git diff --exit-code -- go.mod go.sum
go mod vendor
- name: Generating protobuf code
if: ${{ hashFiles('buf.gen.yaml') != '' }}
run: buf generate
shell: bash
- name: Run go generate
run: go generate ./...
shell: bash
- name: Install mockery
if: ${{ hashFiles('.mockery.yml') != '' }}
run: go install github.com/vektra/mockery/v2
shell: bash
- name: Generate mocks
if: ${{ hashFiles('.mockery.yml') != '' }}
run: mockery
shell: bash
- name: Caching workspace for deploy jobs
uses: wishabi/github-actions/cache@v0

0 comments on commit 90ed947

Please sign in to comment.