Skip to content

Instantly share code, notes, and snippets.

@plocket

plocket/build.sh Secret

Created October 14, 2020 20:07
Show Gist options
  • Save plocket/fa224e5054e344c0b053bb02348c92f2 to your computer and use it in GitHub Desktop.
Save plocket/fa224e5054e344c0b053bb02348c92f2 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir output
cat > output/practice_file.txt << ENDOFFILE
Practicing practice 2
ENDOFFILE
name: Push integrated testing files
# Workflow triggered manually with input variables
on:
workflow_dispatch:
inputs:
repo:
description: Name of repo where you want the files to go
required: true
user:
description: Name of user that owns the repo
required: true
branch:
description: Name of branch to push to on repo
default: main
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
integrated-testing:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: creates output
run: sh ./build_test_boilerplate.sh
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@master
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
# Source directory from the origin directory
source-directory: 'output'
# Name of the destination username/organization
destination-github-username: ${{ github.event.inputs.user }}
# Destination repository
destination-repository-name: ${{ github.event.inputs.repo }}
# Email for the git commit
user-email: 'example@example.com'
target-branch: ${{ github.event.inputs.branch }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment