Skip to content

Commit 73dad6a

Browse files
committed
add-docker-images
1 parent 9095507 commit 73dad6a

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/cpp-gql.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,42 @@ jobs:
7373
retention-days: 90
7474
compression-level: 6
7575
overwrite: true
76+
docker:
77+
runs-on: ubuntu-latest
78+
environment: cpp-gql
79+
if: ${{ github.ref_type == 'tag' }}
80+
needs:
81+
- build
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v4
85+
- name: Login to Docker Hub
86+
uses: docker/login-action@v3
87+
with:
88+
username: ${{ vars.DOCKERHUB_USERNAME }}
89+
password: ${{ secrets.DOCKERHUB_TOKEN }}
90+
- name: Set up QEMU
91+
uses: docker/setup-qemu-action@v3
92+
- name: Set up Docker Buildx
93+
uses: docker/setup-buildx-action@v3
94+
- name: Build and push
95+
uses: docker/build-push-action@v6
96+
with:
97+
file: shared/dockerfiles/gql
98+
load: true
99+
platforms: linux/amd64,linux/arm64
100+
tags: vladimirdev635/gql:$GITHUB_REF_NAME
101+
build-args:
102+
- GQL_VERSION=$GITHUB_REF_NAME
103+
- name: Build and push
104+
uses: docker/build-push-action@v6
105+
with:
106+
platforms: linux/amd64,linux/arm64
107+
push: true
108+
tags: vladimirdev635/gql:$GITHUB_REF_NAME
109+
- name: Build and push
110+
uses: docker/build-push-action@v6
111+
with:
112+
platforms: linux/amd64,linux/arm64
113+
push: true
114+
tags: vladimirdev635/gql:latest

shared/dockerfiles/gql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM alpine:3.22.1
2+
ARG GQL_VERSION
3+
RUN apk add --no-cache wget==1.25.0-r1 &&
4+
wget --progress=dot:giga https://github.com/Voldemat/graphql-plus-plus/releases/download/$GQL_VERSION/gql &&
5+
mv gql /usr/local/bin/ &&
6+
chmod +x /usr/local/bin/gql && gql --help
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

0 commit comments

Comments
 (0)