Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docker): build a docker image containing latest CLI #4576

Merged
merged 2 commits into from Oct 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
@@ -0,0 +1,29 @@

name: Docker

on: workflow_dispatch

jobs:
build-docker-container:
name: Build and Deploy Docker Container with latest CLI
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 14.x
- name: GitHub Container Registry Login
run: echo ${GH_TOKEN} | docker login ghcr.io -u ionitron --password-stdin
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Build Container
run: |
docker build \
--build-arg IONIC_CLI_VERSION=$(npm info @ionic/cli dist-tags.latest) \
--tag ghcr.io/${{ github.repository }}:latest \
--tag ghcr.io/${{ github.repository}}:$(npm info @ionic/cli dist-tags.latest) \
.
- name: Push Container as latest
run: docker push ghcr.io/${{ github.repository }}:latest
- name: Push Container as version
run: docker push ghcr.io/${{ github.repository }}:$(npm info @ionic/cli dist-tags.latest)
14 changes: 14 additions & 0 deletions Dockerfile
@@ -0,0 +1,14 @@
FROM node:lts

# Set CI to true & LANG
ENV CI=1
ENV LANG en_US.UTF-8

# Install the desired version of @ionic/cli
ARG IONIC_CLI_VERSION

RUN npm i -g @ionic/cli@${IONIC_CLI_VERSION} && \
ionic --no-interactive config set -g daemon.updates false && \
ionic --no-interactive config set -g telemetry false

WORKDIR /usr/src/app