Bump Discord.Net from 3.13.1 to 3.14.1 in /src #324
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build - Push | |
on: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
IS-TAG: ${{ startsWith(github.ref, 'refs/tags/') }} | |
jobs: | |
build-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout - Branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v8 | |
- name: Setup - BuildX | |
uses: docker/setup-buildx-action@v3 | |
- name: Login - Docker | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
# determine the global tag to append to the image, 'latest', 'edge', or 'cutting-edge' | |
# outputs 'date', 'tag' and 'custom-version' | |
- name: Docker - Determine tag | |
id: global-tag | |
run: | | |
is_tag="${{ env.IS-TAG }}" | |
is_default="${{ steps.branch-name.outputs.is_default }}" | |
echo "date=$(date +%s)" >> "$GITHUB_OUTPUT" | |
if [ "$is_tag" == "true" ]; then | |
echo "tag=latest" >> "$GITHUB_OUTPUT" | |
elif [ "$is_tag" == "false" ] && [ "$is_default" == "true" ]; then | |
echo "tag=edge" >> "$GITHUB_OUTPUT" | |
echo "custom-version=edge" >> "$GITHUB_OUTPUT" | |
elif [ "$is_tag" == "false" ] && [ "$is_default" == "false" ]; then | |
echo "tag=cutting-edge" >> "$GITHUB_OUTPUT" | |
echo "custom-version=cutting-edge" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Docker - Metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
flavor: latest=false | |
images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }} | |
tags: | | |
# for non-tagged pushes | |
type=sha,format=short,prefix=${{ steps.global-tag.outputs.custom-version }}-{{branch}}-,suffix=-${{ steps.global-tag.outputs.date}},event=branch,enable=${{ env.IS-TAG == 'false' }} | |
# on new tag / release | |
type=semver,pattern={{version}},event=tag,enable=${{ env.IS-TAG == 'true' }} | |
# add global tag | |
type=raw,priority=700,value=${{ steps.global-tag.outputs.tag }} | |
- name: Docker - Build / Push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
build-args: CUSTOM_VERSION=${{ steps.global-tag.outputs.custom-version }} | |
file: ./src/Dockerfile | |
push: ${{ github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# Create a job summary that contains the pushed images | |
- name: Docker - Image job summary | |
run: | | |
echo "## Pushed docker images :cloud:" >> $GITHUB_STEP_SUMMARY | |
tags="${{ steps.meta.outputs.tags }}" | |
IFS=$'\n' | |
for tag in $tags; do | |
echo '```delphi' >> $GITHUB_STEP_SUMMARY | |
echo "$tag" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
done |