update #3
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: Create UI Tag | ||
on: | ||
push: | ||
tags: | ||
- 'v*' # This will trigger on any tag starting with 'v' | ||
jobs: | ||
mirror-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all tags and branches | ||
- name: Get the version | ||
id: get_version | ||
env: | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: Create tag in target repository | ||
env: | ||
TARGET_REPO: rafaelbreno/rancher-ui | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email 'action@github.com' | ||
git clone https://${GH_TOKEN}@github.com/${TARGET_REPO}.git target_repo | ||
cd target_repo | ||
git tag $VERSION | ||
git push origin $VERSION | ||
git push https://${GH_TOKEN}@github.com/${TARGET_REPO}.git $VERSION | ||
run: | | ||