-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (55 loc) · 1.83 KB
/
deploy_to_develop.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Deploy to Develop ( headless.10uplabs.com )
on:
push:
branches:
- develop
- feature/dev-deploy-setup # for testing
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# useful for emulation and building for different architectures
- name: Set Up QEMU
uses: docker/setup-qemu-action@v2
# Use Dockers Buildx build plugin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to 10up Docker
uses: docker/login-action@v2
with:
registry: docker.10up.com
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# set image tag to the branch name
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
tags: |
type=ref,enable=true,priority=600,prefix=,suffix,event=branch
images: |
${{ secrets.IMAGE_NAME }}
ghcr.io/${{ github.repository }}
# TODO: Login to docker hub
- name: Build container and push to Github Packages
uses: docker/build-push-action@v4
with:
file: deploy/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
push: true
context: .
deploy:
needs: build_and_push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Trigger Pipeline
run: curl --request POST --form token=${{ secrets.PIPELINE_TOKEN }} --form ref=trunk "${{ secrets.PIPELINE_URL }}"