Skip to content

Commit

Permalink
Use reusable workflows from a different repository
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Nov 16, 2022
1 parent cc5c9da commit 17e0eda
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 701 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/action_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ jobs:
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
versions: ${{ needs.params.outputs.versions }}
refs: ${{ needs.params.outputs.refs }}
fields_build: ${{ needs.params.outputs.fields_build }}
fields_deploy: ${{ needs.params.outputs.fields_deploy }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}

configure-awskops:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
Expand All @@ -60,7 +58,7 @@ jobs:

configure-awshelm:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
Expand All @@ -79,7 +77,7 @@ jobs:
build-base:
needs:
- configure
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -98,7 +96,7 @@ jobs:
needs:
- configure
- build-base
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -117,7 +115,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -136,7 +134,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -155,7 +153,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -174,7 +172,7 @@ jobs:
needs:
- configure
- build-aws
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand Down Expand Up @@ -239,7 +237,7 @@ jobs:
needs:
- configure
- build-base
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -254,7 +252,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -269,7 +267,7 @@ jobs:
needs:
- configure
- build-infra
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -284,7 +282,7 @@ jobs:
needs:
- configure
- build-azure
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -299,7 +297,7 @@ jobs:
needs:
- configure
- build-aws
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -314,7 +312,7 @@ jobs:
needs:
- configure
- build-awsk8s
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand Down
32 changes: 15 additions & 17 deletions .github/workflows/action_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,19 @@ jobs:
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && (github.event.pull_request.user.login != 'cytopia')) }}
can_deploy: false
versions: ${{ needs.params.outputs.versions }}
refs: ${{ needs.params.outputs.refs }}
fields_build: ${{ needs.params.outputs.fields_build }}
fields_deploy: ${{ needs.params.outputs.fields_deploy }}
secrets:
dockerhub_username: ""
dockerhub_password: ""

configure-awskops:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && (github.event.pull_request.user.login != 'cytopia')) }}
can_deploy: false
Expand All @@ -55,7 +53,7 @@ jobs:

configure-awshelm:
needs: [params]
uses: ./.github/workflows/docker-multistage-configure.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-configure.yml@master
with:
enabled: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && (github.event.pull_request.user.login != 'cytopia')) }}
can_deploy: false
Expand All @@ -74,7 +72,7 @@ jobs:
build-base:
needs:
- configure
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -93,7 +91,7 @@ jobs:
needs:
- configure
- build-base
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -112,7 +110,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -131,7 +129,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -150,7 +148,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand All @@ -169,7 +167,7 @@ jobs:
needs:
- configure
- build-aws
uses: ./.github/workflows/docker-multistage-build.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-build.yml@master
with:
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
Expand Down Expand Up @@ -234,7 +232,7 @@ jobs:
needs:
- configure
- build-base
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -249,7 +247,7 @@ jobs:
needs:
- configure
- build-tools
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -264,7 +262,7 @@ jobs:
needs:
- configure
- build-infra
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -279,7 +277,7 @@ jobs:
needs:
- configure
- build-azure
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -294,7 +292,7 @@ jobs:
needs:
- configure
- build-aws
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand All @@ -309,7 +307,7 @@ jobs:
needs:
- configure
- build-awsk8s
uses: ./.github/workflows/docker-multistage-push-manifest.yml
uses: devilbox/github-actions/.github/workflows/docker-multistage-push-manifest.yml@master
with:
can_deploy: ${{ needs.configure.outputs.can_login == 'true' && needs.configure.outputs.can_push == 'true' }}
has_refs: ${{ needs.configure.outputs.has_refs == 'true' }}
Expand Down
Loading

0 comments on commit 17e0eda

Please sign in to comment.