mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 16:26:47 +00:00
Fix parsing github commit status to container
There was an instance of the git commit message not being passed correctly to the build, thus returning nil on the faas-cli version command. Tested on a failing commit by amending the commit (keeping message) and getting CI to run green Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
parent
272ae94b50
commit
a2bdc94f00
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -35,6 +35,9 @@ jobs:
|
||||
- name: Get Repo Owner
|
||||
id: get_repo_owner
|
||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Get Commit Message
|
||||
id: get_commit_message
|
||||
run: echo ::set-output name=commit_message::$(git log -1 --pretty=%B 2>&1 | head -n 1)
|
||||
- name: Build Gateway
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -46,7 +49,7 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
GIT_COMMIT_MESSAGE=${{ steps.get_commit_message.outputs.commit_message }}
|
||||
tags: |
|
||||
ghcr.io/openfaas/gateway:latest-dev
|
||||
- name: Run CI
|
||||
@ -71,6 +74,9 @@ jobs:
|
||||
- name: Get Repo Owner
|
||||
id: get_repo_owner
|
||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Get Commit Message
|
||||
id: get_commit_message
|
||||
run: echo ::set-output name=commit_message::$(git log -1 --pretty=%B 2>&1 | head -n 1)
|
||||
- name: Build ${{ matrix.svc }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -81,7 +87,7 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
GIT_COMMIT_MESSAGE=${{ steps.get_commit_message.outputs.commit_message }}
|
||||
tags: |
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
||||
|
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
@ -32,6 +32,9 @@ jobs:
|
||||
- name: Get Repo Owner
|
||||
id: get_repo_owner
|
||||
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||
- name: Get Commit Message
|
||||
id: get_commit_message
|
||||
run: echo ::set-output name=commit_message::$(git log -1 --pretty=%B 2>&1 | head -n 1)
|
||||
- name: Publish ${{ matrix.svc }}
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -42,7 +45,7 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.get_tag.outputs.TAG }}
|
||||
GIT_COMMIT=${{ github.sha }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
GIT_COMMIT_MESSAGE="${{ steps.get_commit_message.outputs.commit_message }}"
|
||||
tags: |
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ steps.get_tag.outputs.TAG }}
|
||||
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/gateway:${{ github.sha }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user