-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (37 loc) · 1.37 KB
/
prod.workflow.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
name: Build compose-unpacker docker image to Portainer
run-name: compose-unpacker ${{ github.event.inputs.unpacker_version }} release
on:
workflow_dispatch:
inputs:
unpacker_version:
description: "compose-unpacker version. e.g. 2.20.0"
required: true
release_branch:
description: "release branch. e.g. release/2.20"
required: true
jobs:
release:
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: checkout code
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.release_branch }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/[email protected]
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: image=moby/buildkit:v0.10.6
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image to portainer release
run: |
# make the script executable
chmod +x "${GITHUB_WORKSPACE}/build/build_and_push.sh"
# run the script
"${GITHUB_WORKSPACE}/build/build_and_push.sh" portainer "${{ github.event.inputs.unpacker_version }}"