Import Tomcat JSS project #430
Workflow file for this run
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
name: Build JSS | |
on: [push, pull_request] | |
env: | |
COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} | |
jobs: | |
init: | |
name: Initialization | |
uses: ./.github/workflows/init.yml | |
secrets: inherit | |
build: | |
name: Building JSS | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
id: cache-buildx | |
uses: actions/cache@v3 | |
with: | |
key: buildx-${{ hashFiles('jss.spec') }} | |
path: /tmp/.buildx-cache | |
- name: Build jss-deps image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
build-args: | | |
BASE_IMAGE=${{ needs.init.outputs.base-image }} | |
COPR_REPO=${{ env.COPR_REPO }} | |
tags: jss-deps | |
target: jss-deps | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
if: steps.cache-buildx.outputs.cache-hit != 'true' | |
- name: Build jss-builder-deps image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
build-args: | | |
BASE_IMAGE=${{ needs.init.outputs.base-image }} | |
COPR_REPO=${{ env.COPR_REPO }} | |
tags: jss-builder-deps | |
target: jss-builder-deps | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
if: steps.cache-buildx.outputs.cache-hit != 'true' | |
- name: Build jss-builder image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
build-args: | | |
BASE_IMAGE=${{ needs.init.outputs.base-image }} | |
COPR_REPO=${{ env.COPR_REPO }} | |
tags: jss-builder | |
target: jss-builder | |
cache-from: type=local,src=/tmp/.buildx-cache | |
outputs: type=docker,dest=jss-builder.tar | |
- name: Store jss-builder image | |
uses: actions/cache@v3 | |
with: | |
key: jss-builder-${{ github.sha }} | |
path: jss-builder.tar | |
- name: Build jss-dist image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
build-args: | | |
BASE_IMAGE=${{ needs.init.outputs.base-image }} | |
COPR_REPO=${{ env.COPR_REPO }} | |
tags: jss-dist | |
target: jss-dist | |
cache-from: type=local,src=/tmp/.buildx-cache | |
outputs: type=docker,dest=jss-dist.tar | |
- name: Store jss-dist image | |
uses: actions/cache@v3 | |
with: | |
key: jss-dist-${{ github.sha }} | |
path: jss-dist.tar | |
- name: Build jss-runner image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
build-args: | | |
BASE_IMAGE=${{ needs.init.outputs.base-image }} | |
COPR_REPO=${{ env.COPR_REPO }} | |
tags: jss-runner | |
target: jss-runner | |
cache-from: type=local,src=/tmp/.buildx-cache | |
outputs: type=docker,dest=jss-runner.tar | |
- name: Store jss-runner image | |
uses: actions/cache@v3 | |
with: | |
key: jss-runner-${{ github.sha }} | |
path: jss-runner.tar |