Skip to content

chore(deps): bump codecov/codecov-action from 3.1.4 to 5.0.2 #86

chore(deps): bump codecov/codecov-action from 3.1.4 to 5.0.2

chore(deps): bump codecov/codecov-action from 3.1.4 to 5.0.2 #86

Workflow file for this run

name: Docker Image CI for shopify-tracker
on:
push:
branches: [main]
pull_request:
types:
- closed
branches:
- main
permissions: read-all
jobs:
extract-version:
name: Extract Version
runs-on: ubuntu-latest
if: ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true)
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Get image version
id: get-version
run: |
version=$(jq -r .version package.json)
echo "Version: $version"
echo "version=$version" >> $GITHUB_OUTPUT
build:
name: Build Shopify Tracker Docker Image
if: ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true)
needs: [extract-version]
uses: ./.github/workflows/build-and-push-docker-image.yml
with:
img_tag: ${{ needs.extract-version.outputs.version }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
create-pull-request:
name: Create Pull Request for Shopify Tracker Helm Chart
runs-on: ubuntu-latest
needs: [extract-version, build]
env:
TAG_NAME: ${{ needs.extract-version.outputs.version }}
steps:
- name: Initialize Mandatory Git Config
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Clone Devops Repo
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
- name: Extract branch name
id: extract_branch_name
run: |
cd rudder-devops
branch_name=$(git rev-parse --abbrev-ref HEAD)
echo "branch_name=$branch_name"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- name: Update Helm Chart and Raise Pull Request For Shopify Tracker
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
SP_IMAGE_REPOSITORY: rudderstack/rudder-shopify-tracker
run: |
cd rudder-devops
git checkout -b shopify-tracker-$TAG_NAME ${{steps.extract_branch_name.outputs.branch_name}}
cd helm-charts/helm/shopify-tracking
yq eval -i ".image.tag=\"$TAG_NAME\"" values.yaml
yq eval -i ".image.repository=\"$SP_IMAGE_REPOSITORY\"" values.yaml
git add values.yaml
git commit -m "chore: upgrade shopify tracker to $TAG_NAME"
git push -u origin shopify-tracker-$TAG_NAME
gh pr create --fill