Skip to content

feat: add workflow to trigger external pipeline for publishing lambda layers #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 25, 2020
25 changes: 25 additions & 0 deletions .github/workflows/publish_layer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish lambda layer to SAR

on:
release:
types: [published]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-1
AWS_DEFAULT_OUTPUT: json

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Set release notes tag
run: |
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo ::set-env name=RELEASE_TAG_VERSION::${RELEASE_TAG_VERSION:1}
- name: write version to ssm
run: |
aws ssm put-parameter --name "powertools-python-release-version" --value $RELEASE_TAG_VERSION --overwrite
- name: trigger lamber layer publish pipeline
run: |
aws codepipeline start-pipeline-execution --name ${{ secrets.CODEPIPELINE_NAME }}