forked from akena-engineering/discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Improve channel validation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,57 @@ | ||
| --- | ||
| name: Auto Tag | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| new_tag: | ||
| description: "The new tag" | ||
| value: ${{ jobs.tag.outputs.new_tag }} | ||
|
|
||
| jobs: | ||
| tag: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| outputs: | ||
| new_tag: ${{ steps.tag.outputs.new_tag }} | ||
| steps: | ||
| - name: 🏧 Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: '0' | ||
|
|
||
| - name: 🚀 Bump version and push tag | ||
| uses: anothrNick/github-tag-action@1.75.0 | ||
| id: tag | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| WITH_V: true | ||
| DRY_RUN: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| - name: 📤 Show outputs | ||
| run: | | ||
| echo "Tag: ${{ steps.tag.outputs.tag }}" | ||
| echo "New tag: ${{ steps.tag.outputs.new_tag }}" | ||
| echo "Part: ${{ steps.tag.outputs.part }}" | ||
|
|
||
| - name: 👀 Add comment to PR | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| uses: thollander/actions-comment-pull-request@v2 | ||
| with: | ||
| message: | | ||
| Auto Tag: after merging this PR, the new tag will be: ${{ steps.tag.outputs.new_tag }} | ||
|
|
||
| <details> | ||
| <summary>Details</summary> | ||
|
|
||
| Job: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
|
||
| Use in commit message to bump: | ||
| * `#patch` - v0.0.X -> v0.0.(X+1) | ||
| * `#minor` (default) - v0.X.0 -> v0.(X+1).0 | ||
| * `#major` - vX.0.0 -> v(X+1).0.0 | ||
|
|
||
| </details> | ||
| comment_tag: autotag | ||
This file contains hidden or 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,57 @@ | ||
| --- | ||
| name: Docker | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| type: string | ||
| description: "The version to build and push" | ||
| required: true | ||
|
|
||
| env: | ||
| IMAGE_NAME: discord-bot | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log into GitHub Container Registry | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/boar-network/${{ env.IMAGE_NAME }} | ||
| tags: | | ||
| type=sha | ||
| ${{ github.ref == 'refs/heads/main' && format('type=raw,value={0}', inputs.version) || '' }} | ||
thevops marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: ${{ github.ref == 'refs/heads/main' }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
This file contains hidden or 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,22 @@ | ||
| --- | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| auto-tag: | ||
| uses: ./.github/workflows/_auto-tag.yaml | ||
| secrets: inherit | ||
|
|
||
| docker: | ||
| needs: [auto-tag] | ||
| uses: ./.github/workflows/_docker.yaml | ||
| secrets: inherit | ||
| with: | ||
| version: ${{ needs.auto-tag.outputs.new_tag }} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.