Skip to content

Commit 86fa338

Browse files
workflow_run is kinda broken so we will put everything in one workflow
1 parent c9aacee commit 86fa338

File tree

6 files changed

+74
-150
lines changed

6 files changed

+74
-150
lines changed

.github/workflows/build-htslib-image.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/build-ldc-image.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: build all and release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Get the tag
17+
id: get_version
18+
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/^v//')
19+
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v1
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v1
25+
26+
- name: Login to DockerHub
27+
uses: docker/login-action@v1
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
- name: Build and push dlang image
33+
id: docker_build
34+
uses: docker/build-push-action@v2
35+
with:
36+
context: ./dlang
37+
file: ./dlang/ldc.dockerfile
38+
push: true
39+
tags: charesgregory/dlang-ldc-static:latest,charesgregory/dlang-ldc-static:${{ steps.get_version.outputs.VERSION }}
40+
41+
- name: Build and push test app image
42+
id: docker_build
43+
uses: docker/build-push-action@v2
44+
with:
45+
context: ./tests/test-app
46+
file: ./tests/test-app/Dockerfile
47+
push: true
48+
tags: charesgregory/dlang-ldc-static-test-app:latest,charesgregory/dlang-ldc-static-test-app:${{ steps.get_version.outputs.VERSION }}
49+
50+
- name: Build and push htslib image
51+
id: docker_build
52+
uses: docker/build-push-action@v2
53+
with:
54+
context: ./htslib
55+
file: ./htslib/Dockerfile
56+
push: true
57+
tags: charesgregory/dlang-htslib-static:latest,charesgregory/dlang-htslib-static:${{ steps.get_version.outputs.VERSION }}
58+
59+
- name: extract test app binary
60+
uses: shrink/actions-docker-extract@v1
61+
id: extract
62+
with:
63+
image: charesgregory/dlang-ldc-static-test-app:latest
64+
path: /home/test-app/test
65+
66+
- name: Release
67+
uses: softprops/action-gh-release@v1
68+
with:
69+
files: ${{ steps.extract.outputs.destination }}/test
70+
generate_release_notes: true
71+
draft: true

.github/workflows/release.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ compiled with `mimalloc`.
8181

8282
### Docker and Github Actions
8383

84-
If your docker image is uploaded to Dockerhub, you can use the github actions `.github/workflows/build.yml`
84+
If your docker image is uploaded to Dockerhub, you can use the github actions `.github/workflows/build_and_release.yml`
8585
in this repo to have your docker image built and uploaded to Dockerhub via github actions. You will have to
86-
set up a dockerhub API key. The github actions `.github/workflows/release.yml` can pull a docker image from
87-
Dockerhub, extract your static binary from it, and create a release draft with the binary attached, just
86+
set up a dockerhub API key. The github actions script will also pull the test app docker image from
87+
Dockerhub, extract the static binary from it, and create a release draft with the binary attached, just
8888
look at our `v0.0.1` [release](https://github.com/blachlylab/dlang-static-docker/releases/tag/v0.0.1).

0 commit comments

Comments
 (0)