Skip to content

Commit

Permalink
allow manual CI image build run
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianheuer committed Apr 21, 2023
1 parent c66c9ea commit ed61c9e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build-ci-image

on:
workflow_dispatch:
workflow_call:

jobs:
create-ci-image:
name: "Create CI Image"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Login to image repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./docker
push: true
tags: ghcr.io/${{ github.repository }}/ci:latest
cache-from: type=gha
cache-to: type=gha,mode=max
19 changes: 1 addition & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,9 @@ jobs:
- 'docker/Dockerfile'
create-ci-image:
name: "Create CI Image"
runs-on: "ubuntu-latest"
needs: check-for-ci-image-changes
if: needs.check-for-ci-image-changes.outputs.need-to-build-image == 'true'
steps:
- uses: actions/checkout@v3
- name: Login to image repository
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./docker
push: true
tags: ghcr.io/${{ github.repository }}/ci:latest
cache-from: type=gha
cache-to: type=gha,mode=max
uses: ./.github/workflows/ci-image.yml
tag-pre-release:
name: "Tag Pre-Release"
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit ed61c9e

Please sign in to comment.