-
Notifications
You must be signed in to change notification settings - Fork 358
48 lines (45 loc) · 1.67 KB
/
publish-docker-runtime.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: Publish Docker runtime
on:
workflow_dispatch:
inputs:
tag:
description: runtime tag (ex. runtime-2200) to publish on docker
required: true
jobs:
tag-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.MBF_DOCKERHUB_USERNAME }}
password: ${{ secrets.MBF_DOCKERHUB_PASSWORD }}
- name: Publish runtime docker image
run: |
DOCKER_IMAGE=moonbeamfoundation/moonbeam
DOCKER_TAG="${{ github.event.inputs.tag }}"
COMMIT=`git rev-list -n 1 '${{ github.event.inputs.tag }}'`
SHA=sha-${COMMIT::8}
echo tagging "${DOCKER_IMAGE}:${SHA}"
docker pull "${DOCKER_IMAGE}:${SHA}"
docker tag "${DOCKER_IMAGE}:${SHA}" "${DOCKER_IMAGE}:${DOCKER_TAG}"
docker push "${DOCKER_IMAGE}:${DOCKER_TAG}"
- name: Login to Purestake DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish runtime docker image
run: |
DOCKER_IMAGE=purestake/moonbeam
DOCKER_TAG="${{ github.event.inputs.tag }}"
COMMIT=`git rev-list -n 1 '${{ github.event.inputs.tag }}'`
SHA=sha-${COMMIT::8}
echo tagging "${DOCKER_IMAGE}:${SHA}"
docker pull "${DOCKER_IMAGE}:${SHA}"
docker tag "${DOCKER_IMAGE}:${SHA}" "${DOCKER_IMAGE}:${DOCKER_TAG}"
docker push "${DOCKER_IMAGE}:${DOCKER_TAG}"