Build and Publish #5
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 and Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
env: | |
ARTIFACTORY_USERNAME: build_server | |
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Conan Cache | |
run: docker volume create ConanCache | |
- name: Cache Artifacts | |
id: cache-primes | |
uses: actions/cache@v3 | |
with: | |
path: /var/lib/docker/volumes/ConanCache | |
key: $(docker compose -f bin/docker-compose.yml run --rm bash conan profile show) | |
- name: Generate MASL | |
run: | | |
cd models/ | |
./gen_all.sh | |
- name: Load .env | |
id: dotenv | |
uses: falti/dotenv-action@v1.1 | |
with: | |
path: bin/.env | |
log-variables: true | |
export-variables: true | |
- name: Build and Publish | |
env: MUNIN_VERSION=${{ github.ref_name }} | |
run: | | |
cd models/ | |
./publish_all.sh | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/xtuml/protocol_verifier | |
- name: Build/push image | |
uses: docker/build-push-action@v3 | |
with: | |
context: bin/docker | |
build-args: | | |
MASL_VERSION=${{ steps.dotenv.outputs.masl_version }} | |
MUNIN_VERSION=${{ github.ref_name }} | |
tags: ${{ steps.meta.outputs.tags }} | |
push: true |