Skip to content

submodules....

submodules.... #13

name: Publish Docker image
# on:
# release:
# types: [published]
on:
push:
branches:
- main
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# with:
# submodules: true
- name: submodule checkout
run: |
sed -i 's/[email protected]:/https:\/\/github.com\//g' .gitmodules
sed -i 's/[email protected]:/https:\/\/gitlab.com\//g' .gitmodules
git submodule sync --recursive || true
git submodule update --init --recursive || true
# git submodule update --init
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: 'Build and push Image'
run: |
./docker-build-and-run.sh "--build-only"
docker save maxhbr/ldbcollector:latest | gzip > ldbcollector_latest.tar.gz
docker tag "maxhbr/ldbcollector" "ghcr.io/maxhbr/ldbcollector:latest"
docker push "ghcr.io/maxhbr/ldbcollector:latest"
- uses: actions/upload-artifact@v2
with:
name: dockerimage
path: ldbcollector_latest.tar.gz