Skip to content

Bump Cronos from 0.7.1 to 0.8.0 in /src #286

Bump Cronos from 0.7.1 to 0.8.0 in /src

Bump Cronos from 0.7.1 to 0.8.0 in /src #286

Workflow file for this run

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:
- uses: actions/checkout@v4
- id: branch-name
uses: tj-actions/branch-names@v8
- uses: docker/setup-buildx-action@v3
- 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'
- 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
- 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 }}
- 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
- 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