Skip to content

Commit

Permalink
push-to-another
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Sep 13, 2022
1 parent 02d6118 commit a89de63
Showing 1 changed file with 45 additions and 5 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/push-to-another.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
name: push to another

# - 'kong-gateway-operator-v[0-9]+.[0-9]+.[0-9]+'
on:
push:
branches:
tags:
- '*'

workflow_dispatch:
inputs:
tag:
description: The version to release (e.g. v1.2.3)
required: true

jobs:
lint:
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
Expand All @@ -21,8 +40,28 @@ jobs:
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=0.0.3 make bundle.redhat-certified
run: VERSION=${{ env.VERSION }} make bundle.redhat-certified

- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
Expand All @@ -33,4 +72,5 @@ jobs:
destination-github-username: 'pmalek'
destination-repository-name: 'bundle-redhat-certified'
user-email: [email protected]
target-branch: main
target-branch: kong-gateway-operator-${{ github.event.inputs.tag }}
target-directory: operators/kong-gateway-operator-${{ github.event.inputs.tag }}

0 comments on commit a89de63

Please sign in to comment.