Skip to content

v2024.01.13

v2024.01.13 #87

Workflow file for this run

# 💐💚 coder-images: Optimized, and easy Docker images and Coder templates to use in your everyday work!
# Copyright (c) 2022-2023 Noel <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Release Pipeline
on:
workflow_dispatch:
release:
types: [published]
jobs:
base-image:
name: coder-images/base Pipeline
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Grab version info
id: tag
run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login into ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: auguwu
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push!
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: images/base
file: ./images/base/Dockerfile
push: true
cache-from: type=gha,scope=base-image
cache-to: type=gha,scope=base-image
tags: |
ghcr.io/auguwu/coder-images/base:${{steps.tag.outputs.version}},
ghcr.io/auguwu/coder-images/base:latest
images:
name: coder-images/${{matrix.image}} Pipeline
runs-on: ubuntu-latest
needs: [base-image]
strategy:
matrix:
image: [node, rust, java, golang, dotnet, bun]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Grab version info
id: tag
run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login into ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: auguwu
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push!
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: images/${{matrix.image}}
file: ./images/${{matrix.image}}/Dockerfile
push: true
cache-from: type=gha,scope=${{matrix.image}}
cache-to: type=gha,scope=${{matrix.image}}
tags: |
ghcr.io/auguwu/coder-images/${{matrix.image}}:${{steps.tag.outputs.version}},
ghcr.io/auguwu/coder-images/${{matrix.image}}:latest