Skip to content

Commit a581a0a

Browse files
authored
Merge pull request #40 from elixir-cloud-aai/testing-gh-action
ci: add GitHub Actions workflows
2 parents eaa2a1e + 9c83d45 commit a581a0a

5 files changed

Lines changed: 103 additions & 3 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: tesk-core-filer
2+
3+
on:
4+
push:
5+
branches: [ 'testing-gh-action' ]
6+
tags: [ '*' ]
7+
8+
workflow_dispatch:
9+
inputs:
10+
profile:
11+
description: Profile name
12+
required: false
13+
default: tesk-core-filler
14+
15+
jobs:
16+
build-from-source:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout elixir-cloud-aai/tesk-core
20+
uses: actions/checkout@v3
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Login to DockerHub
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@v4
37+
with:
38+
images: |
39+
elixircloud/${{ github.workflow }}
40+
41+
- name: Build and push Docker images
42+
uses: docker/build-push-action@v3
43+
with:
44+
context: .
45+
push: true
46+
file: ./containers/filer.Dockerfile
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: tesk-core-taskmaster
2+
3+
on:
4+
push:
5+
branches: [ 'testing-gh-action' ]
6+
tags: [ '*' ]
7+
8+
workflow_dispatch:
9+
inputs:
10+
profile:
11+
description: Profile name
12+
required: false
13+
default: tesk-core-taskmaster
14+
15+
jobs:
16+
build-from-source:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout elixir-cloud-aai/tesk-core
20+
uses: actions/checkout@v3
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Login to DockerHub
29+
uses: docker/login-action@v2
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@v4
37+
with:
38+
images: |
39+
elixircloud/${{ github.workflow }}
40+
41+
- name: Build and push Docker images
42+
uses: docker/build-push-action@v3
43+
with:
44+
context: .
45+
push: true
46+
file: ./containers/taskmaster.Dockerfile
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}
49+

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ language: python
33
dist: focal
44
cache: pip
55
python:
6-
- '3.6'
76
- '3.7'
87
- '3.8'
8+
- '3.9'
99
install:
1010
- sudo apt update
1111
- sudo apt upgrade

containers/filer.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ RUN apk add --no-cache python3
2020
COPY --from=builder /app/dist/tesk*.whl /root/
2121
RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl
2222

23+
USER 100
24+
2325
ENTRYPOINT ["filer"]

containers/taskmaster.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apk add --no-cache python3
2020
COPY --from=builder /app/dist/tesk*.whl /root/
2121
RUN python3 -m pip install --disable-pip-version-check --no-cache-dir /root/tesk*.whl
2222

23-
RUN adduser -S taskmaster
24-
USER taskmaster
23+
RUN adduser --uid 100 -S taskmaster
24+
USER 100
2525

2626
ENTRYPOINT ["taskmaster"]

0 commit comments

Comments
 (0)