diff --git a/.github/workflows/CD-Docker.yml b/.github/workflows/CD-Docker.yml index 82360e3e..9e4cd582 100644 --- a/.github/workflows/CD-Docker.yml +++ b/.github/workflows/CD-Docker.yml @@ -14,16 +14,17 @@ jobs: uses: actions/checkout@v2.3.3 - name: Get release version - id: get-version + id: get_version uses: dawidd6/action-get-tag@v1 - name: Login run: docker login -u tyrrrz -p ${{ secrets.DOCKER_TOKEN }} - name: Build - run: docker build -t tyrrrz/discordchatexporter:${{ steps.get-version.outputs.tag }} -t tyrrrz/discordchatexporter:stable . + run: docker build -t tyrrrz/discordchatexporter:${{ steps.get_version.outputs.tag }} -t tyrrrz/discordchatexporter:stable . - - name: Deploy - run: | - docker push tyrrrz/discordchatexporter:${{ steps.get-version.outputs.tag }} - docker push tyrrrz/discordchatexporter:stable \ No newline at end of file + - name: Deploy (version) + run: docker push tyrrrz/discordchatexporter:${{ steps.get_version.outputs.tag }} + + - name: Deploy (stable) + run: docker push tyrrrz/discordchatexporter:stable \ No newline at end of file diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index f246be69..61e75911 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2.3.3 - name: Get release version - id: get-version + id: get_version uses: dawidd6/action-get-tag@v1 - name: Install .NET (v3.1) @@ -85,5 +85,5 @@ jobs: } payload: | { - "content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: " + "content": "**DiscordChatExporter** new version released!\nVersion: `${{ steps.get_version.outputs.tag }}`\nChangelog: " } \ No newline at end of file diff --git a/.github/workflows/CI-Docker.yml b/.github/workflows/CI-Docker.yml index 67986418..cf95b6ea 100644 --- a/.github/workflows/CI-Docker.yml +++ b/.github/workflows/CI-Docker.yml @@ -19,5 +19,5 @@ jobs: - name: Build run: docker build -t tyrrrz/discordchatexporter:latest . - - name: Deploy + - name: Deploy (latest) run: docker push tyrrrz/discordchatexporter:latest \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 10caeaac..b79a9738 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,6 +21,8 @@ jobs: dotnet-version: 5.0.x - name: Build & test + # Tests need access to secrets, so we can't run them against PRs because of limited trust + if: ${{ github.event_name != 'pull_request' }} run: dotnet test --configuration Release --logger GitHubActions env: DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} diff --git a/DiscordChatExporter.Cli.Tests/Readme.md b/DiscordChatExporter.Cli.Tests/Readme.md index 2223e217..bf832251 100644 --- a/DiscordChatExporter.Cli.Tests/Readme.md +++ b/DiscordChatExporter.Cli.Tests/Readme.md @@ -10,8 +10,5 @@ In order to run these tests locally, you need to join the test server and config - **Using an environment variable**: set `DISCORD_TOKEN` variable to your token 4. Run the tests: `dotnet test` -> If you're submitting a pull request, you don't _have_ to run the tests locally -- they are executed automatically by CI. -Running them locally can still sometimes be useful for debugging purposes though. - > If you want to have a new test case or a scenario added, please let me know in your pull request. Currently, it's not possible to add them by yourself. \ No newline at end of file