Skip to content

Update to Python 3.12 base image. #60

Update to Python 3.12 base image.

Update to Python 3.12 base image. #60

Workflow file for this run

---
name: Docker Build Action
on:
pull_request:
branches:
- master
release:
types:
- published
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: metal-deployment-base
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Make tag
run: |
[ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
[ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
[ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.tag }}