forked from TrueCloudLab/action-env
Compare commits
No commits in common. "28cb112243dd71c4180c1d81827d6cf6dca5d488" and "976af216c63fd9b5f81584e3616c434d0379fb09" have entirely different histories.
28cb112243
...
976af216c6
6 changed files with 18 additions and 46 deletions
|
@ -14,8 +14,6 @@ jobs:
|
||||||
- openjdk-11-maven-3.8.6
|
- openjdk-11-maven-3.8.6
|
||||||
- python-3.11
|
- python-3.11
|
||||||
- python-3.13
|
- python-3.13
|
||||||
env:
|
|
||||||
STORAGE_DRIVER: vfs
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone git repo
|
- name: Clone git repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -28,26 +26,18 @@ jobs:
|
||||||
id: changed
|
id: changed
|
||||||
|
|
||||||
- name: Install Buildah
|
- name: Install Buildah
|
||||||
run: |-
|
run: apt update; apt install -y buildah
|
||||||
apt update; apt install -y buildah
|
if: steps.changed.outputs.any_changed == 'true'
|
||||||
|
|
||||||
# STORAGE_DRIVER variable is ignored if this file does not exist
|
|
||||||
touch /etc/containers/storage.conf
|
|
||||||
if: >-
|
|
||||||
github.event_name == 'workflow_dispatch'
|
|
||||||
|| steps.changed.outputs.any_changed == 'true'
|
|
||||||
|
|
||||||
- name: Build OCI image
|
- name: Build OCI image
|
||||||
run: make ${{matrix.tag}}
|
run: make ${{matrix.tag}}
|
||||||
if: >-
|
if: steps.changed.outputs.any_changed == 'true'
|
||||||
github.event_name == 'workflow_dispatch'
|
|
||||||
|| steps.changed.outputs.any_changed == 'true'
|
|
||||||
|
|
||||||
- name: Push image to OCI registry
|
- name: Push image to OCI registry
|
||||||
run: make push-${{matrix.tag}}
|
run: make ${{matrix.tag}} PUSH=y
|
||||||
if: >-
|
if: >-
|
||||||
github.ref == 'refs/heads/master' &&
|
steps.changed.outputs.any_changed == 'true'
|
||||||
(github.event_name == 'workflow_dispatch' ||
|
&& github.ref == 'refs/heads/master'
|
||||||
(steps.changed.outputs.any_changed == 'true' && github.event_name == 'push'))
|
&& github.event_name == 'push'
|
||||||
env:
|
env:
|
||||||
REGISTRY_PASSWORD: ${{secrets.REGISTRY_PASSWORD}}
|
REGISTRY_PASSWORD: ${secrets.REGISTRY_PASSWORD}
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -1,9 +1,11 @@
|
||||||
|
PUSH?=
|
||||||
|
|
||||||
REGISTRY?=git.frostfs.info
|
REGISTRY?=git.frostfs.info
|
||||||
REGISTRY_NAMESPACE?=truecloudlab
|
REGISTRY_NAMESPACE?=truecloudlab
|
||||||
REGISTRY_USER?=$(REGISTRY_NAMESPACE)
|
REGISTRY_USER?=$(REGISTRY_NAMESPACE)
|
||||||
REGISTRY_PASSWORD?=
|
REGISTRY_PASSWORD?=
|
||||||
|
|
||||||
IMAGE?=$(REGISTRY)/$(REGISTRY_NAMESPACE)/env
|
IMAGE=$(REGISTRY)/$(REGISTRY_NAMESPACE)/env
|
||||||
|
|
||||||
TAGS=$(patsubst %/.,%,$(wildcard */.))
|
TAGS=$(patsubst %/.,%,$(wildcard */.))
|
||||||
.PHONY: $(TAGS)
|
.PHONY: $(TAGS)
|
||||||
|
@ -11,10 +13,8 @@ $(TAGS):
|
||||||
buildah images
|
buildah images
|
||||||
cd $@ && buildah bud --tag $(IMAGE):$@ .
|
cd $@ && buildah bud --tag $(IMAGE):$@ .
|
||||||
buildah images
|
buildah images
|
||||||
|
ifneq (,$(PUSH))
|
||||||
PUSH=$(foreach tag,$(TAGS),push-$(tag))
|
echo $$REGISTRY_PASSWORD | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
|
||||||
$(PUSH):
|
buildah push --rm $(IMAGE):$@ docker://$(IMAGE):$@
|
||||||
echo -n "$$REGISTRY_PASSWORD" | wc
|
buildah logout
|
||||||
echo "$$REGISTRY_PASSWORD" | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
|
endif
|
||||||
buildah push --rm $(IMAGE):$(patsubst push-%,%,$@) docker://$(IMAGE):$(patsubst push-%,%,$@)
|
|
||||||
buildah logout $(REGISTRY)
|
|
||||||
|
|
14
README.md
14
README.md
|
@ -5,17 +5,3 @@ is available by default. This is not the case in Forgejo Actions, and we need
|
||||||
to add Node.js to community provided images explicitly.
|
to add Node.js to community provided images explicitly.
|
||||||
|
|
||||||
This repo contains Dockerfile for images used by TrueCloudLab.
|
This repo contains Dockerfile for images used by TrueCloudLab.
|
||||||
|
|
||||||
Images are published to [our registry](https://git.frostfs.info/TrueCloudLab/-/packages/container/env/versions)
|
|
||||||
|
|
||||||
## Modifying container images
|
|
||||||
|
|
||||||
Prepare a pull request with a modified or entirely new Dockerfile.
|
|
||||||
The image will get built and published after PR is merged to master.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
Images for Forgejo Actions must contain:
|
|
||||||
|
|
||||||
- Node.js
|
|
||||||
- Git
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
FROM docker.io/node:20-bookworm-slim as node
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim
|
|
||||||
COPY --from=node /usr/local /usr/local
|
|
||||||
COPY --from=node /opt /opt
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/node:20-bookworm-slim as node
|
FROM docker.io/node:20-bookworm-slim as node
|
||||||
FROM docker.io/python:3.11-bookworm
|
FROM docker.io/python:3.11-slim-bookworm
|
||||||
COPY --from=node /usr/local /usr/local
|
COPY --from=node /usr/local /usr/local
|
||||||
COPY --from=node /opt /opt
|
COPY --from=node /opt /opt
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/node:20-bookworm-slim as node
|
FROM docker.io/node:20-bookworm-slim as node
|
||||||
FROM docker.io/python:3.13-bookworm
|
FROM docker.io/python:3.13-slim-bookworm
|
||||||
COPY --from=node /usr/local /usr/local
|
COPY --from=node /usr/local /usr/local
|
||||||
COPY --from=node /opt /opt
|
COPY --from=node /opt /opt
|
||||||
|
|
Loading…
Add table
Reference in a new issue