Manual build #28
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
name: Manual build | |
on: | |
workflow_dispatch: | |
inputs: | |
CODE_SERVER_BASE_TAG: | |
type: string | |
description: The base tag for code-server image | |
required: true | |
jobs: | |
build-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- id: versions | |
run: | | |
make print-VERSION >> "$GITHUB_ENV" | |
make print-TAG CODE_SERVER_BASE_TAG=${{ github.event.inputs.CODE_SERVER_BASE_TAG }} >> "$GITHUB_ENV" | |
make print-CODE_SERVER_BASE_TAG CODE_SERVER_BASE_TAG=${{ github.event.inputs.CODE_SERVER_BASE_TAG }} >> "$GITHUB_ENV" | |
make print-GOLANG_VERSION >> "$GITHUB_ENV" | |
make print-NODE_VERSION >> "$GITHUB_ENV" | |
make print-PYTHON_VERSION >> "$GITHUB_ENV" | |
make print-DOCKER_VERSION >> "$GITHUB_ENV" | |
make print-KUBECTL_VERSION >> "$GITHUB_ENV" | |
make print-KUSTMIZE_VERSION >> "$GITHUB_ENV" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: Dockerfile | |
tags: | | |
ghcr.io/cosmo-workspace/dev-code-server:${{ env.TAG }} | |
ghcr.io/cosmo-workspace/dev-code-server:${{ env.VERSION }} | |
build-args: | | |
CODE_SERVER_BASE_TAG=${{ env.CODE_SERVER_BASE_TAG }} | |
GOLANG_VERSION=${{ env.GOLANG_VERSION }} | |
NODE_VERSION=${{ env.NODE_VERSION }} | |
PYTHON_VERSION=${{ env.PYTHON_VERSION }} | |
DOCKER_VERSION=${{ env.DOCKER_VERSION }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |