-
Notifications
You must be signed in to change notification settings - Fork 230
65 lines (62 loc) · 2.05 KB
/
docker-build-push-dev.yaml
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
64
65
# build and push docker image to docker hub
name: Build & Deploy Dev
on:
push:
branches:
- "dev"
jobs:
build:
runs-on: ubuntu-latest
environment: Preview
outputs:
version: ${{ steps.meta.outputs.version }}
steps:
- uses: hmarr/debug-action@v2
- name: Checkout
uses: actions/checkout@v4
- name: docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: rss3/xlog
tags: |
type=sha,prefix={{branch}}-
type=sha,format=long,prefix={{branch}}-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"NEXT_PUBLIC_DISCORD_LINK=${{ vars.NEXT_PUBLIC_DISCORD_LINK }}"
"NEXT_PUBLIC_GITHUB_LINK=${{ vars.NEXT_PUBLIC_GITHUB_LINK }}"
"NEXT_PUBLIC_OUR_DOMAIN=${{ vars.NEXT_PUBLIC_OUR_DOMAIN }}"
"NEXT_PUBLIC_TWITTER_LINK=${{ vars.NEXT_PUBLIC_TWITTER_LINK }}"
"NEXT_PUBLIC_WALLET_CONNECT_V2_PROJECT_ID=${{ vars.NEXT_PUBLIC_WALLET_CONNECT_V2_PROJECT_ID }}"
"NEXT_PUBLIC_IPFS_GATEWAY=${{ vars.NEXT_PUBLIC_IPFS_GATEWAY }}"
deploy:
if: github.ref == 'refs/heads/dev'
uses: NaturalSelectionLabs/Daedalus/.github/workflows/deploy-v3-tpl.yaml@main
needs:
- build
with:
images: rss3/xlog
tag: dev-${{ github.sha }}
cluster: dev
namespace: crossbell
releaseName: xlog
revision: dev
dir: deploy/dev
secrets:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}