forked from multiarch/qemu-user-static
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.81 KB
/
actions.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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: actions
on:
push:
branches:
- master
- upgrade_to_9.2 # TEST
paths:
- containers/**
- .github/workflows/actions.yml
- "*.sh"
pull_request:
branches:
- master
paths:
- containers/**
- .github/workflows/actions.yml
- "*.sh"
jobs:
qemu-user-static:
runs-on: ubuntu-latest
env:
VERSION: 9.2.0
ORIGIN_VERSION: 9.2.0+ds-3~bpo12+2
steps:
- uses: actions/checkout@v2
- name: Set variables
run: |
echo "DOCKER_REPO=docker.io/oerv/qemu-user-static" >> $GITHUB_ENV
- name: Build
run: |
wget --content-disposition http://ftp.de.debian.org/debian/pool/main/q/qemu/qemu-user-static_${{ env.ORIGIN_VERSION }}_amd64.deb
wget --content-disposition http://ftp.de.debian.org/debian/pool/main/q/qemu/qemu-user_${{ env.ORIGIN_VERSION }}_amd64.deb
dpkg-deb -x qemu-user-static_*.deb releases
dpkg-deb -x qemu-user_*.deb releases
./run.sh -t "${{ env.VERSION }}" -r "${{ env.GITHUB_REPOSITORY }}" -d "${{ env.DOCKER_REPO }}"
- name: Test
run: ./test.sh -d "${{ env.DOCKER_REPO }}"
- name: Publish
if: github.ref == 'refs/heads/master'
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push --all-tags ${{ env.DOCKER_REPO }}
- name: Create Release
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1
with:
name: "v${{ env.VERSION }}"
tag: "v${{ env.VERSION }}"
body: |
# `qemu-*-static` @ ${{ env.VERSION }}
artifacts: "releases/usr/bin/*.tar.gz,releases/usr/bin/qemu-*-static"
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}