mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-01-29 06:10:54 +00:00
Bumps the actions group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/setup-dotnet](https://github.com/actions/setup-dotnet) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/upload-artifact` from 4.6.1 to 4.6.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](4cec3d8aa0...ea165f8d65) Updates `actions/setup-dotnet` from 4.3.0 to 4.3.1 - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](3951f0dfe7...67a3573c9a) Updates `actions/download-artifact` from 4.1.9 to 4.2.1 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](cc20338598...95815c38cf) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-dotnet dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
name: docker
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
# Outputs from this job aren't really used, but it's here to verify that the Dockerfile builds correctly
|
|
pack:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
|
|
- name: Build image
|
|
run: >
|
|
docker buildx build .
|
|
--file DiscordChatExporter.Cli.dockerfile
|
|
--platform linux/amd64,linux/arm64
|
|
--build-arg VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}
|
|
--output type=tar,dest=DiscordChatExporter.Cli.Docker.tar
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: DiscordChatExporter.Cli.Docker
|
|
path: DiscordChatExporter.Cli.Docker.tar
|
|
if-no-files-found: error
|
|
|
|
deploy:
|
|
# Deploy to DockerHub only on tag push or master branch push
|
|
if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'master' }}
|
|
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
|
|
- name: Login to DockerHub
|
|
run: >
|
|
echo ${{ secrets.DOCKER_TOKEN }} |
|
|
docker login --username tyrrrz --password-stdin
|
|
|
|
- name: Build & push image
|
|
run: >
|
|
docker buildx build .
|
|
--file DiscordChatExporter.Cli.dockerfile
|
|
--platform linux/amd64,linux/arm64
|
|
--build-arg VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}
|
|
--push
|
|
--tag tyrrrz/discordchatexporter:latest
|
|
${{ github.ref_type == 'tag' && '--tag tyrrrz/discordchatexporter:$GITHUB_REF_NAME' || '' }}
|
|
${{ github.ref_type == 'tag' && '--tag tyrrrz/discordchatexporter:stable' || '' }}
|