Skip to content

godev-container-building #20

godev-container-building

godev-container-building #20

Workflow file for this run

name: godev-container-building
on:
workflow_dispatch:
inputs:
version:
description: 'The version of Go to build on top of'
required: true
type: string
os:
description: 'The operating system base to use, like alpine, and should start with a -'
required: false
type: string
default: ''
env:
VERSION: ${{ github.event.inputs.version }}
OS: ${{ github.event.inputs.os }}
jobs:
build-containers-ghcr:
runs-on: ubuntu-latest
steps:
- name: 'Checkout the code'
uses: actions/checkout@v2
- name: 'Log into GHCR'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Extract metadata (tags, labels) for the container.'
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/bzvestey/godev
tags: |
${{ env.VERSION }}${{ env.OS }}
latest
- name: 'Build and Push the container.'
uses: docker/build-push-action@v2
with:
context: ./godev
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
version=${{ env.VERSION }}
os=${{ env.OS }}