Skip to content

Build and Push Electros docker image #78

Build and Push Electros docker image

Build and Push Electros docker image #78

Workflow file for this run

name: Build and Push Electros docker image
on:
push:
branches: [ develop ]
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# build and push the docker image to ghcr.io
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
submodules: recursive
ref: ${{ github.ref }}
- name: Populate daemons folder
run: |
export CI_TOKEN=${{ secrets.CI_TOKEN }}
./populate_daemons.sh --platform linux --arch x64 --develop
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.REPO_KEY }}
- name: Build and push Docker image
run: |
OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
docker build -f docker/Dockerfile -t ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest .
docker push ghcr.io/${OWNER_NAME}/elemento-electros-instance:latest