Skip to content

Docker Build Aliyun Linux #87

Docker Build Aliyun Linux

Docker Build Aliyun Linux #87

Workflow file for this run

name: Docker Build Aliyun Linux
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 1'
env:
TZ: Asia/Shanghai
# TODO Fix
IMAGE_NAME: alinux
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build . -f images/${{ env.IMAGE_NAME }}/3/Dockerfile -t ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:3
docker tag ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:3 ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:latest
docker build . -f images/${{ env.IMAGE_NAME }}/2/Dockerfile -t ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:2
- name: Login to Docker Registry
run: |
docker login -u ${{vars.USERNAME}} -p "${{ secrets.APIKEY }}" ${{ vars.DOCKER_REGISTRY }}
- name: Push Docker Image
run: |
docker push ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:latest
docker push ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:3
docker push ${{ vars.DOCKER_REGISTRY }}/dockenv/${{ env.IMAGE_NAME }}:2