mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 13:53:59 -07:00
Docker env implemented
This commit is contained in:
parent
b9a985fb56
commit
2dc4656d72
3 changed files with 150 additions and 0 deletions
45
.github/workflows/release.yml
vendored
Normal file
45
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
docker-image:
|
||||
name: Build the docker image
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
|
||||
# uncomment for publishing on hub.docker.com (don't forget to fillup the repository secrets)
|
||||
#- uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_LOGIN }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: gacts/github-slug@v1 # Action page: <https://github.com/gacts/github-slug>
|
||||
id: slug
|
||||
|
||||
- uses: docker/build-push-action@v3 # Action page: <https://github.com/docker/build-push-action>
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
|
||||
build-args: HYDRA_VERSION="${{ steps.slug.outputs.version-semantic }}"
|
||||
tags: |
|
||||
ghcr.io/${{ github.actor }}/hydra:${{ steps.slug.outputs.version-semantic }}
|
||||
# append the following line to the list above for publishing on hub.docker.com
|
||||
# (and don't forget to change on a real repo/user name)
|
||||
# vanhauser-thc/thc-hydra:${{ steps.slug.outputs.version-semantic }}
|
||||
|
33
.github/workflows/tests.yml
vendored
Normal file
33
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, main]
|
||||
tags-ignore: ['**']
|
||||
paths-ignore: [README, TODO, PROBLEMS]
|
||||
pull_request:
|
||||
paths-ignore: [README, TODO, PROBLEMS]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs: # Docs: <https://git.io/JvxXE>
|
||||
docker-build:
|
||||
name: Build the docker image
|
||||
runs-on: ubuntu-20.04
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
|
||||
- uses: docker/build-push-action@v3 # Action page: <https://github.com/docker/build-push-action>
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7
|
||||
push: false
|
||||
tags: hydra:ci
|
Loading…
Add table
Add a link
Reference in a new issue