Skip to content

chore(deps): bump ip from 1.1.5 to 1.1.9 #5

chore(deps): bump ip from 1.1.5 to 1.1.9

chore(deps): bump ip from 1.1.5 to 1.1.9 #5

name: build and push image pr
on:
push:
branches:
- master
- develop
pull_request:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Logging in to Docker
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Image Tags
run: |
img_version=$(jq -r .version package.json)
echo "img_version=$img_version" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
rudderstack/action-hub
tags: |
type=raw,value={{ $img_version }}, enable=${{ github.event_name == 'push' && github.ref_name == 'master' }}
type=raw,value=${{ github.head_ref }}, enable=${{ github.event_name == 'pull_request' }}
- name: Build and push rudder-looker-actions
uses: docker/build-push-action@v3
with:
context:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
build-args: |
VERSION=${{ github.ref_name }}
# Raise PR to devops
- name: Initialize Mandatory Git Config
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Clone Devops Repo
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
- name: Raise PR to update image in production
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
cd rudder-devops
git checkout -b rudder-looker-actions-$img_version
cd helm-charts/helm/looker-action-hub/environment/prod
yq eval -i ".actionhubImage.image=\"rudderstack/action-hub:$img_version\"" base.yaml
git add base.yaml
git commit -m "chore: upgrade looker-action to $img_version"
git push -u origin rudder-looker-actions-$img_version
gh pr create --fill