From ea2b75cb143f0fc31f87d886a277f2424c2d8049 Mon Sep 17 00:00:00 2001 From: Tobias Brandt Date: Wed, 12 Oct 2022 23:42:18 +0200 Subject: [PATCH] Adds GH action for pushing to ghcr.io --- .github/workflows/release.yaml | 31 +++++++++++++++++++++++++++++++ CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- README.md | 6 ++---- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fe4bb2a..aef4e71 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,3 +59,34 @@ jobs: command: publish env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + publish-gh-package: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@4 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:{{ inputs.tag_name }} + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: ${{ steps.meta.output.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 910554e..f792182 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # pq Changelog +## 0.0.8 - 2022-10-1& + +* Added Github action for ghcr.io packages + ## 0.0.7 - 2022-10-17 * Updated repo links to point to prql organisation. diff --git a/Cargo.toml b/Cargo.toml index ed2d638..56a0c6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/prql/prql-query" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.64.0" -version = "0.0.7" +version = "0.0.8" [[bin]] name = "pq" diff --git a/README.md b/README.md index 6a3f328..9da0776 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,8 @@ dowloaded from [Releases](https://github.com/prql/prql-query/releases/) ### Run as a container image (Docker) - git clone https://github.com/prql/prql-query.git - cd prql-query - docker build -t pq . - alias pq="docker run --rm -it -v $(pwd):/data -w /data -u $(id -u):$(id -g) pq" + docker pull ghcr.io/prql/prql-query:v0.0.8 + alias pq="docker run --rm -it -v $(pwd):/data -w /data -u $(id -u):$(id -g) ghcr.io.prql/prql-query:v0.0.8" pq --help ### Via Rust toolchain (Cargo)