Bump docker/build-push-action from 4.1.1 to 4.2.0 #376
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
# Runs whenever the main branch is changed (except for tags) | |
name: VERDICT Main Workflow | |
on: | |
push: | |
branches: [ master ] | |
tags-ignore: [ '*' ] | |
workflow_dispatch: | |
# Builds soteria_pp native binary | |
# Builds VERDICT source with Java and Maven | |
# Pushes verdict-dev image to Docker Hub | |
# Updates verdict-dev in VERDICT-update-sites | |
jobs: | |
main: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
distribution: [ temurin ] | |
java-version: [ 17 ] | |
ocaml-compiler: [ 4.09.1 ] | |
os: [ macos-12, ubuntu-22.04 ] | |
steps: | |
- name: Check out VERDICT source | |
uses: actions/checkout@v4.0.0 | |
- name: Set up OCaml | |
uses: ocaml/setup-ocaml@v2.0.19 | |
with: | |
ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
- name: Build soteria_pp | |
run: | | |
cd tools/verdict-back-ends/soteria_pp | |
opam install --yes . --deps-only | |
opam exec make | |
# Run rest of steps only on Linux - macOS isn't needed | |
- name: Set up GraphViz | |
if: runner.os == 'Linux' | |
uses: ts-graphviz/setup-graphviz@v1 | |
- name: Set up Java and Maven | |
if: runner.os == 'Linux' | |
uses: actions/setup-java@v3.12.0 | |
with: | |
cache: maven | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.java-version }} | |
- name: Build VERDICT source | |
if: runner.os == 'Linux' | |
run: | | |
mvn -B install -f tools/verdict-back-ends/verdict-bundle/z3-native-libs/pom.xml | |
mvn -B package -f tools/pom.xml -Dtycho.localArtifacts=ignore | |
env: | |
GraphVizPath: /usr/bin | |
- name: Set up Docker Buildx | |
if: runner.os == 'Linux' | |
uses: docker/setup-buildx-action@v2.10.0 | |
- name: Login to Docker Hub | |
if: runner.os == 'Linux' | |
uses: docker/login-action@v2.2.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push verdict-dev image | |
if: runner.os == 'Linux' | |
uses: docker/build-push-action@v4.2.0 | |
with: | |
context: tools/verdict-back-ends | |
file: tools/verdict-back-ends/Dockerfile | |
push: true | |
cache-from: type=registry,ref=gehighassurance/verdict-dev:latest | |
cache-to: type=inline | |
tags: gehighassurance/verdict-dev:latest | |
- name: Check out VERDICT-update-sites | |
if: runner.os == 'Linux' | |
uses: actions/checkout@v4.0.0 | |
with: | |
repository: ge-high-assurance/VERDICT-update-sites | |
token: ${{ secrets.CI_PAT }} | |
path: VERDICT-update-sites | |
- name: Update verdict-dev in VERDICT-update-sites | |
if: runner.os == 'Linux' | |
run: | | |
cd VERDICT-update-sites | |
rm -rf verdict-dev | |
mv ../tools/verdict/com.ge.research.osate.verdict.updatesite/target/repository verdict-dev | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Update verdict-dev in VERDICT-update-sites" | |
git push |