Skip to content

update

update #20

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 (partially complete)
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: |
nix build -o ldbcollector.tar.gz .#ldbcollector-image
cat ldbcollector.tar.gz | docker load
# 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.tar.gz