Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ain-soph committed Dec 25, 2020
1 parent b0e23f6 commit efd4fc2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
publish:
runs-on: ubuntu-latest
container:
image: local0state/trojanzoo:sphinx
image: local0state/trojanzoo:base
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
publish:
runs-on: ubuntu-latest
container:
image: local0state/trojanzoo:sphinx
image: local0state/trojanzoo:base
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
34 changes: 26 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: release

on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [created]

jobs:
pypi:
runs-on: ubuntu-latest
container:
image: local0state/trojanzoo:sphinx
image: local0state/trojanzoo:base
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -29,7 +23,7 @@ jobs:
run: |
python -m pep517.build .
twine upload dist/*
docker:
docker_cpu:
needs: pypi
runs-on: ubuntu-latest
steps:
Expand All @@ -51,3 +45,27 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/trojanzoo:cpu
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
docker_gpu:
needs: pypi
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./docker/cpu.dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/trojanzoo:gpu
${{ secrets.DOCKERHUB_USERNAME }}/trojanzoo:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit efd4fc2

Please sign in to comment.