-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (21 loc) · 1.2 KB
/
publish.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
name: 'publish'
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin
docker build -f Dockerfile.production . --tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} --build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}"
docker tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/} ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}
docker push ghcr.io/${{ github.repository }}:latest
docker build -f Dockerfile.production . --tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet --build-arg BUGSNAG_KEY="${{ secrets.BUGSNAG_KEY }}" --build-arg DIRECTORY_DOMAIN=testcosmos.directory
docker tag ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet ghcr.io/${{ github.repository }}:latest-testnet
docker push ghcr.io/${{ github.repository }}:${GITHUB_REF#refs/tags/}-testnet
docker push ghcr.io/${{ github.repository }}:latest-testnet