push to another #1
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: push to another | |
# - 'kong-gateway-operator-v[0-9]+.[0-9]+.[0-9]+' | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: The version to release (e.g. v1.2.3) | |
required: true | |
jobs: | |
publish-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ncipollo/release-action@v1 | |
with: | |
body: stuff | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.event.inputs.tag }} | |
commit: ${{ github.sha }} | |
prerelease: ${{ github.event.inputs.prerelease }} | |
copy: | |
runs-on: ubuntu-latest | |
# needs: | |
# - publish-release | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '^1.19' | |
- name: strip v from tag | |
run: | | |
TAG=${{ github.event.inputs.tag }} | |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
repository: pmalek/bundle-redhat-certified' | |
token: ${{ secrets.PAT_GITHUB }} | |
path: bundle-redhat-certified | |
ref: main | |
- name: create and push branch | |
run: | | |
cd bundle-redhat-certified | |
git checkout kong-gateway-operator-${{ github.event.inputs.tag }} | |
git push origin kong-gateway-operator-${{ github.event.inputs.tag }} | |
- name: bundle | |
run: VERSION=${{ env.VERSION }} make bundle.redhat-certified | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.PAT_GITHUB }} | |
with: | |
source-directory: 'bundle/redhat-certified' | |
destination-github-username: 'pmalek' | |
destination-repository-name: 'bundle-redhat-certified' | |
user-email: [email protected] | |
target-branch: kong-gateway-operator-${{ github.event.inputs.tag }} | |
target-directory: operators/kong-gateway-operator-${{ github.event.inputs.tag }} |