2022-03-28 14:09:57 +00:00
|
|
|
name: "Build Docker image"
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-docker:
|
|
|
|
name: "🐳 Build and publish Docker image"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout repository"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: "❓ Find the release semantic version"
|
|
|
|
id: semver
|
2022-12-04 00:14:00 +00:00
|
|
|
uses: Steffo99/actions-semver@v0.3.5
|
|
|
|
with:
|
|
|
|
string: ${{ github.event.release.tag_name }}
|
2022-03-28 14:09:57 +00:00
|
|
|
|
|
|
|
- name: "🔨 Setup Buildx"
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: "🔑 Login to GitHub Containers"
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: RYGhub
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: "🏗 Build and push the Docker image"
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
tags: >-
|
2022-12-04 00:16:29 +00:00
|
|
|
ghcr.io/steffo99/greed:${{ steps.semver.outputs.precedence }},
|
|
|
|
ghcr.io/steffo99/greed:${{ steps.semver.outputs.core }},
|
|
|
|
ghcr.io/steffo99/greed:${{ steps.semver.outputs.pair }},
|
2022-03-28 14:51:34 +00:00
|
|
|
ghcr.io/steffo99/greed:${{ steps.semver.outputs.major }},
|
|
|
|
ghcr.io/steffo99/greed:latest
|
2022-12-04 00:06:49 +00:00
|
|
|
platforms: >-
|
2022-12-04 00:18:05 +00:00
|
|
|
linux/amd64,
|
|
|
|
linux/arm/v7,
|
2022-12-04 00:06:49 +00:00
|
|
|
linux/arm64
|
2022-03-28 14:09:57 +00:00
|
|
|
push: true
|