-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use matrix strategy for similar jobs to save time * update version of third-party actions * use composite actions Issue: #1030 Signed-off-by: Ndibe Raymond Olisaemeka <[email protected]> Co-authored-by: Ndibe Raymond Olisaemeka <[email protected]>
- Loading branch information
1 parent
b6a3b28
commit 9de2230
Showing
10 changed files
with
166 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Checkout files action | ||
inputs: | ||
ref: | ||
required: false | ||
type: string | ||
repository: | ||
required: false | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout files | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
repository: ${{ inputs.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Docker build and push action | ||
inputs: | ||
dockerhub_username: | ||
required: true | ||
type: string | ||
dockerhub_token: | ||
required: true | ||
type: string | ||
context: | ||
required: true | ||
type: string | ||
file: | ||
required: true | ||
type: string | ||
tags: | ||
required: true | ||
type: string | ||
push: | ||
required: true | ||
type: boolean | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ inputs.dockerhub_username }} | ||
password: ${{ inputs.dockerhub_token }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ${{ inputs.context }}} | ||
file: ${{ inputs.file }} | ||
push: ${{ inputs.push }} | ||
tags: ${{ inputs.tags }} | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Copy files action | ||
inputs: | ||
host: | ||
required: true | ||
type: string | ||
username: | ||
required: true | ||
type: string | ||
key: | ||
required: true | ||
type: string | ||
source: | ||
required: true | ||
type: string | ||
target: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Copy file via scp | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ inputs.host }} | ||
username: ${{ inputs.username }} | ||
key: ${{ inputs.key }} | ||
source: ${{ inputs.source }} | ||
target: ${{ inputs.target }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Execute remote command action | ||
inputs: | ||
host: | ||
required: true | ||
type: string | ||
username: | ||
required: true | ||
type: string | ||
key: | ||
required: true | ||
type: string | ||
script: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Executing remote command | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ inputs.host }} | ||
username: ${{ inputs.username }} | ||
key: ${{ inputs.key }} | ||
script: ${{ inputs.script }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters