mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-09-01 16:49:00 +02:00
543426393a
Bumps the actions group with 1 update: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action). Updates `docker/setup-buildx-action` from 4.2.0 to 4.3.0 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/bb05f3f5519dd87d3ba754cc423b652a5edd6d2c...37fe631027851001ddb9b187196cc803df7f5f0e) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 4.3.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:
|
|
- prime
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
branches:
|
|
- prime
|
|
|
|
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: DiscordChatExporter.Cli.Docker
|
|
path: DiscordChatExporter.Cli.Docker.tar
|
|
if-no-files-found: error
|
|
|
|
deploy:
|
|
# Deploy to DockerHub only on tag push or prime branch push
|
|
if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'prime' }}
|
|
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Install Docker Buildx
|
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.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' || '' }}
|