-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: build-image-ya | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-image: | ||
name: build-image | ||
runs-on: ubuntu-latest | ||
|
||
# Add "id-token" with the intended permissions. | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: "auth" | ||
name: "Authenticate to Google Cloud" | ||
uses: "google-github-actions/auth@v2" | ||
with: | ||
workload_identity_provider: "projects/753698311885/locations/global/workloadIdentityPools/github-pool/providers/github-provider" | ||
service_account: "github-service-account@nitraai.iam.gserviceaccount.com" | ||
|
||
- id: secrets | ||
uses: google-github-actions/get-secretmanager-secrets@main | ||
with: | ||
secrets: |- | ||
docker-hub:nitraai/docker-hub | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: vitaliytv | ||
password: ${{ steps.secrets.outputs.docker-hub }} | ||
|
||
- name: Set up Docker Context for Buildx | ||
id: buildx-context | ||
run: | | ||
docker context create builders | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: latest | ||
endpoint: builders | ||
|
||
- name: build and push amd64 | ||
run: | | ||
docker buildx build \ | ||
-f ya.Dockerfile . \ | ||
--platform linux/amd64 \ | ||
--tag nitra/actions-runner-ya:latest \ | ||
--tag "nitra/actions-runner-ya:${GITHUB_SHA::8}" \ | ||
--push |
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,5 @@ | ||
{ | ||
"scripts": { | ||
"ya-build": "docker build -t t1 -f ya.Dockerfile ." | ||
} | ||
} |
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,38 @@ | ||
FROM bitnami/kubectl AS kubectl | ||
|
||
|
||
FROM ghcr.io/actions/actions-runner:latest | ||
|
||
ENV TZ="Europe/Riga" | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
COPY --from=kubectl /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/ | ||
|
||
RUN sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl gnupg | ||
|
||
# Node 22 | ||
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | ||
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list | ||
|
||
# YC | ||
RUN curl -sSL https://storage.yandexcloud.net/yandexcloud-yc/install.sh | bash | ||
|
||
# # Install: | ||
RUN sudo apt update && \ | ||
sudo apt-get install -y \ | ||
nodejs \ | ||
zip \ | ||
tzdata \ | ||
--no-install-recommends | ||
|
||
RUN sudo npm install -g corepack | ||
|
||
# RUN node --version && npm --version | ||
# додаємо depcheck щоб швидше запускався | ||
RUN npx depcheck --version && \ | ||
# npx esbuild --version && \ | ||
npx hasura-cli@2.36.2 version | ||
|
||
RUN sudo rm -rf /var/lib/apt/lists/* | ||
|