forked from Steffo99/greed
-
Notifications
You must be signed in to change notification settings - Fork 59
48 lines (40 loc) · 1.28 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
uses: Steffo99/[email protected]
with:
string: ${{ github.event.release.tag_name }}
- 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/[email protected]
with:
tags: >-
ghcr.io/darrenwestwood/greed:${{ steps.semver.outputs.precedence }},
ghcr.io/darrenwestwood/greed:${{ steps.semver.outputs.core }},
ghcr.io/darrenwestwood/greed:${{ steps.semver.outputs.pair }},
ghcr.io/darrenwestwood/greed:${{ steps.semver.outputs.major }},
ghcr.io/darrenwestwood/greed:latest
platforms: >-
linux/amd64
push: true