forked from CardanoSolutions/ogmios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ritudhwaj Ambardekar
authored and
Ritudhwaj Ambardekar
committed
Dec 10, 2024
1 parent
a07c154
commit 2f8fce3
Showing
3 changed files
with
9 additions
and
144 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ linux ] | ||
arch: [ x86_64, aarch64 ] | ||
arch: [ x86_64 ] | ||
compiler: [ ghc94 ] | ||
devx-version: [ 54ea65610338600bd4c4afd04b0b6ff612988fd4 ] | ||
|
||
|
@@ -227,7 +227,7 @@ jobs: | |
os: [ linux ] | ||
arch: [ x86_64 ] | ||
network: [ preview ] | ||
cardano-node: [ 10.1.2 ] | ||
cardano-node: [ 10.1.3 ] | ||
|
||
runs-on: ${{ matrix.os == 'linux' && 'ubuntu-22.04' }} | ||
steps: | ||
|
@@ -402,10 +402,10 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ linux ] | ||
target: [ cardano-node-ogmios ] | ||
target: [ ogmios ] | ||
network: [ mainnet, preprod, preview, sanchonet ] | ||
cardano-node: [ 10.1.2 ] | ||
cardano-node-latest: [ 10.1.2 ] | ||
cardano-node: [ 10.1.3 ] | ||
cardano-node-latest: [ 10.1.3 ] | ||
arch: [ x86_64 ] | ||
steps: | ||
- name: 📥 Checkout repository | ||
|
@@ -421,7 +421,7 @@ jobs: | |
with: | ||
dockerfile: "./Dockerfile" | ||
failure-threshold: warning | ||
ignore: DL3029 DL3059 | ||
ignore: DL3029 DL3059 DL3006 | ||
|
||
- name: 🐳 Login to DockerHub | ||
if: ${{ github.event_name == 'push' }} | ||
|
@@ -433,7 +433,7 @@ jobs: | |
- name: 📝 Base Variables | ||
id: base-variables | ||
run: | | ||
echo "image=cardanosolutions/${{ matrix.target }}" >> $GITHUB_OUTPUT | ||
echo "image=ritudhwaj/${{ matrix.target }}" >> $GITHUB_OUTPUT | ||
- name: 📝 Tag Variables | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} | ||
|
@@ -507,138 +507,3 @@ jobs: | |
platforms: ${{ matrix.os }}/${{ matrix.arch == 'x86_64' && 'amd64' || 'arm64' }} | ||
cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest-${{ matrix.network }} | ||
cache-to: type=inline | ||
|
||
docker_standalone: | ||
needs: [ server_build ] | ||
runs-on: ${{ matrix.os == 'linux' && 'ubuntu-22.04' }} | ||
strategy: | ||
matrix: | ||
os: [ linux ] | ||
target: [ ogmios ] | ||
arch: [ x86_64, aarch64 ] | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: 🧰 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: 🧐 hadolint | ||
uses: brpaz/[email protected] | ||
with: | ||
dockerfile: "./Dockerfile" | ||
failure-threshold: warning | ||
ignore: DL3029 DL3059 | ||
|
||
- name: 🐳 Login to DockerHub | ||
if: ${{ github.event_name == 'push' }} | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
|
||
- name: 📝 Base Variables | ||
id: base-variables | ||
run: | | ||
echo "image=cardanosolutions/${{ matrix.target }}" >> $GITHUB_OUTPUT | ||
- name: 📝 Tag Variables | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} | ||
id: tag-variables | ||
run: | | ||
echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | ||
- name: 📝 Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ steps.base-variables.outputs.image }} | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=semver,pattern=v{{version}} | ||
- name: 📥 Download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ogmios-${{ github.sha }}-${{ matrix.arch }}-${{ matrix.os }} | ||
path: server | ||
|
||
- name: 📸 Build image | ||
id: build | ||
if: ${{ github.event_name == 'push' }} | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
target: ${{ matrix.target }} | ||
platforms: ${{ matrix.os }}/${{ matrix.arch == 'x86_64' && 'amd64' || 'arm64' }} | ||
cache-from: type=registry,ref=${{ steps.base-variables.outputs.image }}:latest | ||
cache-to: type=inline | ||
outputs: type=image,name=${{ steps.base-variables.outputs.image }},push-by-digest=true,name-canonical=true,push=true | ||
|
||
- name: 🔡 Export digest | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
mkdir -p /tmp/digests | ||
digest="${{ steps.build.outputs.digest }}" | ||
touch "/tmp/digests/${digest#sha256:}" | ||
- name: 💾 Upload digest | ||
if: ${{ github.event_name == 'push' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: digests | ||
path: /tmp/digests/* | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
registry: | ||
needs: [ docker_standalone ] | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
target: [ ogmios ] | ||
steps: | ||
- name: 📥 Download digests | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: digests | ||
path: /tmp/digests | ||
|
||
- name: 🧰 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: 📝 Base Variables | ||
id: base-variables | ||
run: | | ||
echo "image=cardanosolutions/${{ matrix.target }}" >> $GITHUB_OUTPUT | ||
- name: 📝 Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ steps.base-variables.outputs.image }} | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=semver,pattern=v{{version}} | ||
- name: 🐳 Login to DockerHub | ||
if: ${{ github.event_name == 'push' }} | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} | ||
|
||
- name: 📦 Create manifest list and push | ||
if: ${{ github.event_name == 'push' }} | ||
working-directory: /tmp/digests | ||
run: | | ||
docker buildx imagetools create \ | ||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
$(printf '${{ steps.base-variables.outputs.image }}@sha256:%s ' *) | ||
- name: 🧐 Inspect image | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
docker buildx imagetools inspect ${{ steps.base-variables.outputs.image }}:${{ steps.meta.outputs.version }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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