Test flow #1
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
on: | |
push: | |
branches: | |
- ekw/SRE-1004/release-base-image | |
env: | |
SERVICE_NAME: "base" | |
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} | |
DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN}} | |
RUST_VERSION: "1.73.0" | |
GHC_VERSION: "9.6.4" | |
PROTOC_VERSION: "3.15.3" | |
FLATBUFFERS_VERSION: "v22.12.06" | |
NVM_SH_VERSION: "v0.37.2" | |
CMAKE_VERSION: "3.25.1" | |
jobs: | |
release-base-image: | |
if: ${{ startsWith(github.ref_name, 'ekw') }} #${{ startsWith(github.ref_name, '${{env.SERVICE_NAME}}') }} | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ env.DOCKERHUB_USERNAME }} | |
password: ${{ env.DOCKERHUB_TOKEN }} | |
- name: Get the Image tag | |
env: | |
TAG: 'base-rust.1.73-ghc9.6.4-test' #${{ github.ref_name }} | |
run: echo "FULL_IMAGE_TAG=concordium/${{ env.SERVICE_NAME }}:${TAG##${{ env.SERVICE_NAME}}-}" >> $GITHUB_ENV | |
- name: Check if image exist | |
run: | | |
set +e | |
docker manifest inspect ${{ env.FULL_IMAGE_TAG }} | |
exitcode=$? | |
if [ $exitcode -eq "0" ]; then | |
echo "Error: ${{env.SERVICE_NAME}}:rust${{env.RUST_VERSION}}-ghc${{env.GHC_VERSION}} already exist" | |
exit 1 | |
fi | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Build Docker Image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: docker/base.Dockerfile | |
tags: ${{ env.FULL_IMAGE_TAG }} | |
no-cache: true | |
push: false | |
ssh: | | |
default=./id_rsa | |
build-args: | | |
rust_version="${{env.RUST_VERSION}}" | |
ghc_version="${{env.GHC_VERSION}}" | |
protoc_version="${{env.PROTOC_VERSION}}" | |
flatbuffers_tag="${{env.FLATBUFFERS_VERSION}}" | |
nvm_sh_version="${{env.NVM_SH_VERSION}}" | |
cmake_version="${{env.CMAKE_VERSION}}" |