Skip to content

Commit

Permalink
ci: container package release
Browse files Browse the repository at this point in the history
  • Loading branch information
heronimus committed Oct 4, 2024
1 parent 19b2f38 commit 59a9b3d
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
branch:
- main

env:
REGISTRY: ghcr.io

release:
name: Release
runs-on: ubuntu-latest
# Add "id-token" with the intended permissions.
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker - Auth to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
# branch event
type=ref,event=branch
# tag event
type=ref,event=tag
# sha
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ This is a Discord bot that can be used to query crypto prices using the Coingeck
- [DPP - C++ Discord API Bot Library](https://github.com/brainboxdotcc/DPP/)
- [nlohmann_json](https://github.com/nlohmann/json)

### Usage

#### Docker

```
docker run -it --platform=linux/amd64 -e DISCORD_TOKEN=xxxxx ghcr.io/asiantbd/crypto-prices-slash-bot:latest
```

### Build

#### Build Using External Precompiled Dependency (Recommended)
Expand Down

0 comments on commit 59a9b3d

Please sign in to comment.