Skip to content

chore(deps): update dependency red-discordbot to v3.5.15 #145

chore(deps): update dependency red-discordbot to v3.5.15

chore(deps): update dependency red-discordbot to v3.5.15 #145

Workflow file for this run

name: Build/Push Image
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
push:
description: 'Push'
required: false
type: boolean
default: true
env:
IMAGE_NAME: red-discordbot
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Red version and define tags
id: build_info
run: |
RED_VERSION=$(cat ./redbot/requirements.txt | grep 'Red-DiscordBot' | sed -e 's/Red-DiscordBot\s\?==\s\?//g')
echo "red_version=$RED_VERSION" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/#-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/#-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Gather Docker metadata
uses: docker/metadata-action@v5
id: meta
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}},value=${{ steps.build_info.outputs.red_version }},enable={{is_default_branch}}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.build_info.outputs.red_version }},enable={{is_default_branch}}
type=semver,pattern={{major}},value=${{ steps.build_info.outputs.red_version }},enable={{is_default_branch}}
type=ref,event=pr
- name: Build and push image
uses: docker/build-push-action@v6
with:
push: ${{ inputs.push != 'false' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64,linux/arm64
# Build cache is scoped to branches by default.
# We use the main branch as a fallback if there's no cache for the existing branch.
# https://stackoverflow.com/a/77127188/5209106
cache-from: |
type=gha
type=gha,scope=main
cache-to: type=gha,mode=max
provenance: false