Skip to content

Commit

Permalink
Merge pull request #35 from portainer/feat/workflow-updates
Browse files Browse the repository at this point in the history
feat/workflow updates
  • Loading branch information
yajith authored Apr 11, 2024
2 parents 3749f7d + 2b2d3ed commit c84535c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
name: staging
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4.1.1
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3.0.0
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0
with:
driver-opts: image=moby/buildkit:v0.10.6
- name: login to docker hub
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/prod.workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Build compose-unpacker docker image to Portainer
run-name: compose-unpacker ${{ github.event.inputs.unpacker_version }} release

on:
push:
branches:
- master
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:
Expand All @@ -12,21 +18,23 @@ jobs:
name: production
steps:
- name: checkout code
uses: actions/checkout@v2
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.release_branch }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3.0.0
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0
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 ( Master Latest )
- name: build the image to portainer release
run: |
# make the script executeable
chmod +x "${GITHUB_WORKSPACE}/build/build_and_push.sh"
# run the script
"${GITHUB_WORKSPACE}/build/build_and_push.sh" portainer latest
"${GITHUB_WORKSPACE}/build/build_and_push.sh" portainer {{ github.event.inputs.unpacker_version }}

0 comments on commit c84535c

Please sign in to comment.