-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Dockerize action code (#911)
- Loading branch information
1 parent
2773637
commit 3367aab
Showing
8 changed files
with
30 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,23 +17,11 @@ jobs: | |
with: | ||
id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.PRIVATE_KEY }} | ||
- run: "echo '{\"installations\": ${{ steps.stats.outputs.installations }}, \"repositories\": ${{ steps.stats.outputs.repositories }}, \"suspended\": ${{ steps.stats.outputs.suspended_installations }}, \"popular\": ${{ steps.stats.outputs.popular_repositories }} }' > public/stats.json" | ||
|
||
- name: 'Commit Action Installation Statistics' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add public/stats.json | ||
git commit -m "Build by GitHub Actions" || true | ||
if: job.status == 'success' | ||
- run: "echo installations: '${{ steps.stats.outputs.installations }}'" | ||
|
||
- name: 'Update repo' | ||
run: git pull --no-rebase | ||
- run: "echo repositories: '${{ steps.stats.outputs.repositories }}'" | ||
|
||
- name: 'Push changes' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
if: job.status == 'success' | ||
- run: "echo suspended: '${{ steps.stats.outputs.suspended_installations }}'" | ||
|
||
- run: "echo most popular repositories: '${{ steps.stats.outputs.popular_repositories }}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ jobs: | |
release: | ||
name: Semantic Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: 'Checkout sources' | ||
uses: actions/checkout@v4 | ||
|
@@ -24,30 +26,13 @@ jobs: | |
- name: 'Build GitHub Actions distribution' | ||
run: yarn action:dist | ||
|
||
- name: 'Commit GitHub Actions distribution' | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Build by GitHub Actions | ||
file_pattern: action-dist/index.js | ||
|
||
- name: 'Semantic Release' | ||
id: semantic | ||
uses: cycjimmy/semantic-release-action@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'GitHub release' | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.semantic.outputs.new_release_version }} | ||
|
||
- name: 'Commit GitHub Actions distribution' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add action-dist/index.js | ||
git commit -m "Build by GitHub Actions" || true | ||
if: job.status == 'success' | ||
|
||
- name: 'Push changes' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
force: true | ||
if: job.status == 'success' | ||
run: npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM node:20-alpine | ||
RUN mkdir /app | ||
COPY action-dist /app/action-dist | ||
WORKDIR /app | ||
CMD ["node", "./action-dist/index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters