mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-10 11:52:29 +00:00
Bumps the actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-dotnet](https://github.com/actions/setup-dotnet). Updates `actions/checkout` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](8e8c483db8...de0fac2e45) Updates `actions/setup-dotnet` from 5.0.1 to 5.1.0 - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](2016bd2012...baa11fbfe1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-dotnet dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.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 image
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.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' || '' }}
|