Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlanabrennan committed Aug 29, 2023
1 parent 6910ea3 commit 5b13668
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
ORIGINAL_REPO_NAME: ${{ github.event.repository.full_name }}
CHART_DIRECTORY: 'charts/nri-metadata-injection'

jobs:
build:
Expand Down Expand Up @@ -44,6 +45,8 @@ jobs:
name: Release docker
needs: [ build ]
runs-on: ubuntu-latest
outputs:
new-version: ${{ steps.set-new-version.outputs.new-version }}
env:
DOCKER_IMAGE_NAME: newrelic/k8s-metadata-injection
DOCKER_PLATFORMS: "linux/amd64,linux/arm64,linux/arm" # Must be consistent with the matrix from the job above
Expand All @@ -54,6 +57,7 @@ jobs:
echo "${{ github.event.release.tag_name }}" | grep -E '^[v]?[0-9.]*[0-9]$'
DOCKER_IMAGE_TAG=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//')
echo "DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG" >> $GITHUB_ENV
echo "new-version=$DOCKER_IMAGE_TAG" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -95,7 +99,6 @@ jobs:
-t $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG \
-t $DOCKER_IMAGE_NAME:latest \
.
open-pr:
name: Update version and appVersion and open pr
needs: [ docker-integration ]
Expand Down Expand Up @@ -165,15 +168,15 @@ jobs:
run: gh pr create -B main -H update-chart-version-${{ github.sha }} --title 'Bump version and appVersion' --body 'Bump version and appVersion as part of release automation.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

notify-failure:
if: ${{ always() && failure() }}
needs: [docker-integration]
needs: [docker-integration, open-pr]
runs-on: ubuntu-latest
steps:
- name: Notify failure via Slack
uses: archive/github-actions-slack@b91c7e2ff3852411ad4fbdad441a8133221ac86e
with:
slack-bot-user-oauth-access-token: ${{ secrets.K8S_AGENTS_SLACK_TOKEN }}
slack-channel: ${{ secrets.K8S_AGENTS_SLACK_CHANNEL }}
slack-text: "❌ `${{ env.ORIGINAL_REPO_NAME }}`: <${{ github.server_url }}/${{ env.ORIGINAL_REPO_NAME }}/actions/runs/${{ github.run_id }}|release pipeline failed>."
slack-text: "❌ `${{ env.ORIGINAL_REPO_NAME }}`: <${{ github.server_url }}/${{ env.ORIGINAL_REPO_NAME }}/actions/runs/${{ github.run_id }}|release pipeline failed>."

0 comments on commit 5b13668

Please sign in to comment.