forked from moonbeam-foundation/moonbeam
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (59 loc) · 2.01 KB
/
publish-docker-runtime.yml
File metadata and controls
63 lines (59 loc) · 2.01 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Publish Docker runtime
on:
workflow_dispatch:
inputs:
tag:
description: runtime tag (ex. runtime-3400) to publish on docker
required: true
jobs:
####### Building binaries #######
build-binary:
runs-on: moonbeam-release-medium
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Cargo build
uses: ./.github/workflow-templates/build-prod-binary
with:
target: "x86-64"
ref: ${{ github.event.inputs.tag }}
publish-docker:
runs-on: ubuntu-latest
permissions:
contents: read
needs: ["build-binary"]
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: actions/download-artifact@v5
with:
pattern: binaries-*
merge-multiple: true
path: build
- name: Prepare
id: prep
run: |
echo "rename default binary"
mv build/moonbeam-x86-64 build/moonbeam
DOCKER_IMAGE=moonbeamfoundation/moonbeam
TAGS="${DOCKER_IMAGE}:${{ github.event.inputs.tag }}"
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Cargo build
uses: ./.github/workflow-templates/publish-docker
with:
dockerhub_username: ${{ secrets.MBF_DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }}
image_tags: ${{ steps.prep.outputs.tags }}
image_title: ${{ github.event.repository.name }}
image_description: ${{ github.event.repository.description }}
image_url: ${{ github.event.repository.html_url }}
image_source: ${{ github.event.repository.clone_url }}
image_created: ${{ steps.prep.outputs.created }}
image_revision: ${{ github.sha }}
image_licenses: ${{ github.event.repository.license.spdx_id }}