Skip to content

Commit

Permalink
replace critical variable usages (#734)
Browse files Browse the repository at this point in the history
* replace critical variable usages

* add cache for foundry

* test

* test

* test

* test

* test

* test

* test

* test

* test

* add dependabot config file to watch for outdated actions
  • Loading branch information
0xDEnYO authored Jul 30, 2024
1 parent ebcea3a commit 8780d62
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file ensures that we get informed when dependencies of actions (e.g. other actions) are outdated and can be updated
# Dependabot will even create a PR and update the files automatically
# More info here: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/' # will check in ./.github/workflows with this setting
schedule:
# Check for updates to GitHub Actions every week
interval: 'weekly'
14 changes: 8 additions & 6 deletions .github/workflows/types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout contracts repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}

Expand All @@ -39,7 +39,7 @@ jobs:
run: yarn typechain

- name: Checkout lifi-contract-types repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: lifinance/lifi-contract-types
path: lifi-contract-types
Expand Down Expand Up @@ -86,15 +86,17 @@ jobs:
echo "LATEST_TAG=${LATEST_TAG}" >> $GITHUB_ENV
- name: Update version
env:
MESSAGE: ${{ github.event.head_commit.message }}
id: bump_version
uses: christian-draeger/increment-semantic-version@1.1.0
with:
current-version: '${{ env.LATEST_TAG }}'
version-fragment: "${{ env.BRANCH_NAME == 'main' && (contains(github.event.head_commit.message, 'major') && 'major' || contains(github.event.head_commit.message, 'feat') && 'feature' || 'bug') || 'beta' }}"
version-fragment: "${{ env.BRANCH_NAME == 'main' && (contains(env.MESSAGE, 'major') && 'major' || contains(env.MESSAGE, 'feat') && 'feature' || 'bug') || 'beta' }}"

- name: Push tag
env:
MESSAGE: ${{github.event.head_commit.message }}
MESSAGE: ${{ github.event.head_commit.message }}
if: steps.bump_version.outputs.next-version
run: |
cd lifi-contract-types
Expand All @@ -109,9 +111,9 @@ jobs:
git commit -m 'actions: new contracts version ${{ steps.bump_version.outputs.next-version }}'
# Sanitize the commit message by removing single quotes
COMMIT_MSG=$(echo "${{env.MESSAGE}}" | sed "s/'//g")
COMMIT_MSG=$(echo "${{ env.MESSAGE }}" | sed "s/'//g")
git tag -a v${{ steps.bump_version.outputs.next-version }} -m '${{ github.event.head_commit.message }}'
git tag -a v${{ steps.bump_version.outputs.next-version }} -m "${{ env.MESSAGE }}"
git push origin tag v${{ steps.bump_version.outputs.next-version }}
if [[ "$BRANCH_NAME" == "main" ]]; then
git push -u origin $BRANCH_NAME
Expand Down

0 comments on commit 8780d62

Please sign in to comment.