Skip to content

Commit

Permalink
ci: release action
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Jul 28, 2024
1 parent 796c956 commit e0d7c4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: build

on:
push:
branches: 'main'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
steps:
- uses: actions/checkout@v4
Expand All @@ -24,7 +23,7 @@ jobs:
echo ${GHCR_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
docker buildx build --push \
--cache-from=type=gha --cache-to=type=gha,mode=max \
--platform linux/amd64 \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/${USERNAME}/ghstats:main .
- name: build & push (tag)
Expand All @@ -37,5 +36,11 @@ jobs:
echo ${GHCR_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
docker buildx build --push \
--cache-from=type=gha --cache-to=type=gha,mode=max \
--platform linux/amd64 \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/${USERNAME}/ghstats:${ref} -t ghcr.io/${USERNAME}/ghstats:latest .
- name: Create Github Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

- Collect & store traffic metrics for all your repos
- List of repos and informative dashboard for each
- No React / Next / Postres etc, just single and small Docker image (20MB) & SQLite
- No React / Next / Postgres etc, just single and small Docker image (20MB) & SQLite

### 🚀 Usage

Expand Down

0 comments on commit e0d7c4c

Please sign in to comment.