-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.77 KB
/
Copy pathcontainer.yml
File metadata and controls
55 lines (51 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Container
# Builds the Kolla-style image (docker/Dockerfile) and pushes it to
# GHCR. Tags: the git tag for releases, "main" for branch pushes; each
# also gets a "-<kolla base tag>" suffixed variant so the OpenStack
# release the image was built against is explicit.
on:
push:
branches: [main]
tags: ["v*"]
env:
BASE_TAG: 2025.1-ubuntu-noble
jobs:
image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
# setuptools-scm derives the version from git history
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
# The Dockerfile installs the wheel from dist/
- run: pip install build
- run: python -m build
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=branch,suffix=-${{ env.BASE_TAG }}
type=ref,event=tag,suffix=-${{ env.BASE_TAG }}
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: docker/Dockerfile
build-args: |
BASE_TAG=${{ env.BASE_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}