Skip to content

Commit

Permalink
Merge pull request #44 from initializ-buildpacks/automations/github-c…
Browse files Browse the repository at this point in the history
…onfig/update

Updates github-config
  • Loading branch information
Naveen-is-here authored Aug 20, 2024
2 parents e4fa90c + 5edf4fe commit 9eeee23
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/update-dependencies-from-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
schedule:
- cron: '57 13 * * *' # daily at 13:57 UTC

env:
AWS_REGION : "us-east-1"
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout

jobs:
retrieve:
name: Retrieve New Versions and Generate Metadata
Expand All @@ -21,6 +27,7 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v3


- name: Setup Go
uses: actions/setup-go@v3
Expand Down Expand Up @@ -221,6 +228,22 @@ jobs:
echo "artifact-file=$(basename ./*.tgz)" >> "$GITHUB_OUTPUT"
echo "checksum-file=$(basename ./*.tgz.checksum)" >> "$GITHUB_OUTPUT"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Upload to S3
id: upload
uses: initializ-buildpacks/github-config/actions/dependency/upload-to-s3@main
with:
bucket-name: "initializ-buildpacks"
dependency-name: ${{ needs.retrieve.outputs.id }}
artifact-path: ${{ steps.get-file-names.outputs.artifact-file }}
- name: Get Checksum
id: get-checksum
run: echo "checksum=$(cat ${{ steps.get-file-names.outputs.checksum-file }})" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -304,6 +327,7 @@ jobs:
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: initializ-buildpacks/github-config/actions/pull-request/push-branch@main
with:
token: ${{ secrets.PAT }}
branch: automations/dependencies/update-from-metadata
- name: Open Pull Request
Expand Down Expand Up @@ -331,4 +355,4 @@ jobs:
issue_body: |
Update Dependencies From Metadata workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
comment_body: |
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
6 changes: 3 additions & 3 deletions .github/workflows/update-go-mod-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout PR Branch
uses: initializ-buildpacks/github-config/actions/pull-request/checkout-branch@main
with:
branch: automation/go-mod-update/update-main
branch: automations/go-mod-update/update-main
- name: Setup Go
id: setup-go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -63,15 +63,15 @@ jobs:
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: initializ-buildpacks/github-config/actions/pull-request/push-branch@main
with:
branch: automation/go-mod-update/update-main
branch: automations/go-mod-update/update-main

- name: Open Pull Request
if: ${{ steps.commit.outputs.commit_sha != '' }}
uses: initializ-buildpacks/github-config/actions/pull-request/open@main
with:
token: ${{ secrets.PAT }}
title: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}"
branch: automation/go-mod-update/update-main
branch: automations/go-mod-update/update-main

failure:
name: Alert on Failure
Expand Down

0 comments on commit 9eeee23

Please sign in to comment.