Skip to content

Docker Build Almalinux #53

Docker Build Almalinux

Docker Build Almalinux #53

name: Docker Build Almalinux
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 1'
env:
TZ: Asia/Shanghai
IMAGE_NAME: almalinux
IMAGE_TAGS: "latest 8.4 8.8 8.8-minimal 8.9 8.9-minimal 9.2 9.2-minimal 9.3 9.3-minimal"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
for tag in ${IMAGE_TAGS}; do
docker build . -f images/${{ env.IMAGE_NAME }}/${tag}/Dockerfile -t ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:${tag}
done
- name: Login to Docker Registry
run: |
docker login -u ${{vars.USERNAME}} -p "${{ secrets.APIKEY }}" ${{ vars.DOCKER_REGISTRY }}
- name: Push Docker Image
run: |
for tag in ${IMAGE_TAGS}; do
docker push ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:${tag}
done