chore: update git url before cloning enrichment plugin #249
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Onto Develop | |
on: | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v5.1 | |
# - run: git fetch --all --tags | |
# - name: Check Release Version | |
# uses: thebongy/version-check@v1 | |
# with: | |
# file: worker/package.json | |
# tagFormat: v${version} | |
# failBuild: true | |
- run: | | |
docker login --username rudderlabs --password '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
export VERSION=${{ steps.branch-name.outputs.current_branch }} | |
rm -rf rudder-alerta-enrichment-plugin | |
git config --global url."https://${{secrets.PAT}}:x-oauth-basic@github.com/rudderlabs".insteadOf "https://github.com/rudderlabs" | |
git clone -b "$(cat RUDDER_ENRICH_PLUGIN_BRANCH_NAME)" git clone https://github.com/rudderlabs/rudder-alerta-enrichment-plugin.git | |
docker build --no-cache --build-arg=COMMIT_ID_VALUE="$(git log --format="%H" -n 1)" -t rudderlabs/alerta:$VERSION . | |
docker push rudderlabs/alerta:$VERSION | |
rm -rf rudder-alerta-enrichment-plugin | |
name: Docker build and push |