-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releases will now push a docker image. This is a really easy way to get up and running: docker run -it elliotchance/vsql:latest cli mydb.vsql Fixes #150
- Loading branch information
1 parent
e423a6e
commit aac5b37
Showing
4 changed files
with
106 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up V version latest | ||
uses: nocturlab/setup-vlang-action@v1 | ||
with: | ||
id: v | ||
v-version: master | ||
|
||
- name: Build linux binaries | ||
run: | | ||
.github/workflows/set_version.sh | ||
make bin/vsql | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
elliotchance/vsql | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: elliotchance | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM alpine:3.14 | ||
RUN apk add gcompat | ||
COPY bin/vsql /usr/bin | ||
ENTRYPOINT ["vsql"] |
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 |
---|---|---|
@@ -1,18 +1,61 @@ | ||
Installing & Updating | ||
===================== | ||
|
||
vsql can be installed or updated using `V <https://vlang.io>`_: | ||
There are lots of ways to install vsql depending on how you want to use it. | ||
|
||
Docker | ||
------ | ||
|
||
Docker is the easiest way to get up and running (if you have | ||
`Docker installed <https://docs.docker.com/get-docker/>`_.). Pull the latest | ||
stable version with: | ||
|
||
.. code-block:: sh | ||
docker pull elliotchance/vsql:latest | ||
You can also use major (``0``), minor (``0.27``) or patch versions (``0.27.1``). | ||
View all versions on | ||
`hub.docker.com/repository/docker/elliotchance/vsql/tags <https://hub.docker.com/repository/docker/elliotchance/vsql/tags?page=1&ordering=last_updated>`_. | ||
|
||
Run the CLI directly (see :doc:`cli`): | ||
|
||
.. code-block:: sh | ||
docker run -it elliotchance/vsql:latest cli mydb.vsql | ||
Or, start the PostgreSQL-compatible server (see :doc:`server`): | ||
|
||
.. code-block:: sh | ||
docker run -it elliotchance/vsql:latest server mydb.vsql | ||
Prebuilt Binaries | ||
----------------- | ||
|
||
This is the best way to use vsql on most platforms without any dependencies. | ||
|
||
Prebuilt binaries for macOS, Windows and Linux are available on the | ||
`GitHub Releases Page <https://github.com/elliotchance/vsql/releases>`_. | ||
|
||
V Package Manager | ||
----------------- | ||
|
||
This is the best method if you intend to build V applications using it as a | ||
library. See `v-client-library`. | ||
|
||
.. code-block:: sh | ||
v install elliotchance.vsql | ||
Or, if you don't have V installed you can also download standalone binaries from | ||
the `Releases <https://github.com/elliotchance/vsql/releases>`_. | ||
Compiling From Source | ||
--------------------- | ||
|
||
See Also | ||
-------- | ||
This is the best choice if you want to modify vsql source or contribute to the | ||
project. See :doc:`contributing`: | ||
|
||
.. code-block:: sh | ||
- :doc:`cli` | ||
- :doc:`contributing` | ||
- :doc:`v-client-library` | ||
git clone https://github.com/elliotchance/vsql.git | ||
cd vsql | ||
make bin/vsql |