-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergei Kuvakin
committed
Jul 20, 2021
1 parent
d9c81fc
commit 3f5929a
Showing
6 changed files
with
55 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,51 @@ | ||
name: actions | ||
on: push | ||
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: 5.2.0-11 | ||
ORIGIN_VERSION: 5.2+dfsg-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set variables | ||
run: | | ||
echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
echo "ORIGIN_VERSION=${ORIGIN_VERSION}" >> $GITHUB_ENV | ||
echo "DOCKER_REPO=${DOCKER_REPO}/$GITHUB_REPOSITORY" >> $GITHUB_ENV | ||
env: | ||
VERSION: 5.2.0-2 | ||
ORIGIN_VERSION: 5.2+dfsg-3 | ||
DOCKER_REPO: docker.io | ||
- name: Build releases | ||
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_${ORIGIN_VERSION}_amd64.deb | ||
dpkg-deb -R qemu-user-static_*.deb . | ||
./generate_tarballs.sh | ||
- name: Publish releases | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
sudo apt install jq | ||
./publish.sh -v "$VERSION" -t ${{ secrets.GITHUB_TOKEN }} -r "$GITHUB_REPOSITORY" | ||
- name: Build images | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
./update.sh -v "$VERSION" -t "$VERSION" -r "$GITHUB_REPOSITORY" -d "$DOCKER_REPO" | ||
- name: Test images | ||
run: | | ||
docker images | ||
./test.sh -d "$DOCKER_REPO" | ||
- name: Publish images | ||
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 $DOCKER_REPO | ||
docker push ${{ 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" | ||
draft: false | ||
prerelease: false | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM busybox | ||
ENV QEMU_BIN_DIR=/usr/bin | ||
ADD ./register.sh /register | ||
ADD https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh | ||
ADD https://raw.githubusercontent.com/qemu/qemu/7c81570d932268a9626457a662f1c5046ebc455e/scripts/qemu-binfmt-conf.sh /qemu-binfmt-conf.sh | ||
RUN chmod +x /qemu-binfmt-conf.sh | ||
COPY qemu-*-static /usr/bin/ | ||
ENTRYPOINT ["/register"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters