Skip to content

Build Docker Images (Ubuntu LTS) #92

Build Docker Images (Ubuntu LTS)

Build Docker Images (Ubuntu LTS) #92

name: Build Docker Images (Ubuntu LTS)
on:
push:
branches:
- main
paths:
- 'build/ubuntu/lts/**'
- 'docker/**'
schedule:
- cron: '0 22 * * FRI' # 每周六 06:00 执行任务(CST = UTC + 8:00)
workflow_dispatch:
jobs:
init-build-env:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
run: bash ./setup.sh
- name: Compress Folder
run: zip -r /tmp/artifact.zip . -x ".git/*"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: env-artifact
path: /tmp/artifact.zip
build-ubuntu1604:
runs-on: ubuntu-latest
needs: [init-build-env]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: env-artifact
path: .
- name: Decompress Artifact
run: unzip artifact.zip -d .
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: ./
file: ./build/ubuntu/lts/16.04/Dockerfile
push: true
tags: th3s/pwn-env:ubuntu-16.04
build-ubuntu1804:
runs-on: ubuntu-latest
needs: [init-build-env]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: env-artifact
path: .
- name: Decompress Artifact
run: unzip artifact.zip -d .
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: ./
file: ./build/ubuntu/lts/18.04/Dockerfile
push: true
tags: th3s/pwn-env:ubuntu-18.04
build-ubuntu2004:
runs-on: ubuntu-latest
needs: [init-build-env]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: env-artifact
path: .
- name: Decompress Artifact
run: unzip artifact.zip -d .
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: ./
file: ./build/ubuntu/lts/20.04/Dockerfile
push: true
tags: th3s/pwn-env:ubuntu-20.04
build-ubuntu2204:
runs-on: ubuntu-latest
needs: [init-build-env]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: env-artifact
path: .
- name: Decompress Artifact
run: unzip artifact.zip -d .
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: ./
file: ./build/ubuntu/lts/22.04/Dockerfile
push: true
tags: th3s/pwn-env:ubuntu-22.04