Skip to content

fix: use python for version check instead of bc #105

fix: use python for version check instead of bc

fix: use python for version check instead of bc #105

Workflow file for this run

name: build swpwn docker image
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
push:
branches: main
paths:
- 'build/**'
schedule:
- cron: '0 0 1 * *'
jobs:
all:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
VERSION: ["20.04", "22.04", "24.04"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Dockerhub
uses: docker/login-action@v1
with:
username: beswing
password: ${{secrets.DOCKER_HUB_TOKEN}}
- name: Build and push ubuntu ${{ matrix.VERSION }}
run: |
ls -al .
sed -i -e 's/FROM ubuntu:22.04/FROM ubuntu:${{ matrix.VERSION }}/g' build/Dockerfile
docker build -t beswing/swpwn:${{ matrix.VERSION }} build/
docker push beswing/swpwn:${{ matrix.VERSION }}