Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/check_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Push repo to aws github codecommit"

# if you want manually trigger this action pls unmark this line
# on: [ workflow_dispatch ]
on:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Extract branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: extract_branch

- name: Push to AWS CodeCommit
env:
CODECOMMIT_HOST: ${{ secrets.CODECOMMIT_REPO_HOST }}
CODECOMMIT_REPO_URL: ${{ secrets.CODECOMMIT_REPO_URL }}
CODECOMMIT_SSH_CONFIG: ${{ secrets.CODECOMMIT_SSH_CONFIG }}
CODECOMMIT_SSH_PRIVATE_KEY: ${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY }}
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
shell: bash
run: |
mkdir ~/.ssh
echo "$CODECOMMIT_SSH_PRIVATE_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
echo "$CODECOMMIT_SSH_CONFIG" > ~/.ssh/config && chmod 600 ~/.ssh/config
ssh-keyscan "$CODECOMMIT_HOST" >> ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts
git remote add codecommit "$CODECOMMIT_REPO_URL"
git push codecommit ${{ env.BRANCH_NAME }}:${{ env.BRANCH_NAME }} -f
30 changes: 30 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a basic workflow that is manually triggered

name: Manual workflow

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
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 "greet"
greet:
# 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:
# Runs a single command using the runners shell
- name: Send greeting
run: echo "Hello ${{ github.event.inputs.name }}"
21 changes: 0 additions & 21 deletions Jenkinsfile

This file was deleted.