forked from multiarch/qemu-user-static
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.6 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
name: actions
on:
push:
branches:
- master
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: 7.2.0-1
ORIGIN_VERSION: 7.2+dfsg-1~bpo11+2
steps:
- uses: actions/checkout@v2
- name: Set variables
run: |
echo "DOCKER_REPO=docker.io/$GITHUB_REPOSITORY" >> $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
dpkg-deb -R qemu-user-static_*.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 }}