-
Notifications
You must be signed in to change notification settings - Fork 171
41 lines (34 loc) · 1.14 KB
/
distro.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Distro
on:
workflow_dispatch:
push:
env:
TAG_NAME: ${{ format('wslvpnkit:{0}-{1}', github.sha, github.run_number) }}
RUN_URL: ${{ format('{0}/{1}/actions/runs/{2}/attempts/{3}', github.server_url, github.repository, github.run_id, github.run_attempt) }}
DOCKLE_HOST: "unix:///var/run/docker.sock" # https://github.com/Azure/container-scan/issues/146
jobs:
build:
runs-on: ubuntu-20.04
permissions:
checks: write
steps:
- uses: actions/checkout@v3
- name: Build
run: |
docker build -t $TAG_NAME -f ./distro/alpine.dockerfile --build-arg REF=$RUN_URL --build-arg VERSION=${GITHUB_REF#refs/tags/} .
- uses: anchore/scan-action@v3
with:
image: ${{ env.TAG_NAME }}
- name: Package
run: |
CONTAINER_ID=$(docker create $TAG_NAME)
docker export $CONTAINER_ID | gzip > wsl-vpnkit.tar.gz
sha256sum wsl-vpnkit.tar.gz | tee wsl-vpnkit.tar.gz.sha256
ls -la wsl-vpnkit.tar.gz
- name: Artifacts
uses: actions/upload-artifact@v3
with:
name: wsl-vpnkit
path: |
wsl-vpnkit.tar.gz
wsl-vpnkit.tar.gz.sha256