Skip to content

Commit

Permalink
Add VERSION argument to python packages
Browse files Browse the repository at this point in the history
First step in fixing #33
  • Loading branch information
tjamet committed Mar 9, 2020
1 parent 2e2a204 commit 3d2d801
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,23 @@ jobs:
if: steps.is-modified.outputs.modified == 'true' || (github.event_name == 'push' && github.event.ref == 'refs/heads/re-builld-all')
- run: |
docker build -t ${{ matrix.image }} ${{ matrix.image }}
if [ -e "${{ matrix.image }}/tags.yaml" ]; then
for tag in $(cat "${{ matrix.image }}/tags.yaml" | docker run --rm -i whalebrew/yq -r '.versions[]'); do
docker build -t ${{ matrix.image }}:${tag} --build-arg VERSION=${tag} ${{ matrix.image }}
done
fi
if: steps.is-modified.outputs.modified == 'true' || (github.event_name == 'push' && github.event.ref == 'refs/heads/re-builld-all')
- run: |
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | base64 -d | docker login --password-stdin -u whalebrewci
echo ${{ github.token }} | docker login --password-stdin -u ${{ github.actor }} docker.pkg.github.com
docker tag ${{ matrix.image }} ${{ github.event.repository.owner.name}}/${{ matrix.image }}
docker tag ${{ matrix.image }} docker.pkg.github.com/${{ github.event.repository.owner.name }}/${{ github.event.repository.name }}/${{ matrix.image }}
if [ -e "${{ matrix.image }}/tags.yaml" ]; then
for tag in $(cat "${{ matrix.image }}/tags.yaml" | docker run --rm -i whalebrew/yq -r '.versions[]'); do
docker tag ${{ matrix.image }}:${tag} ${{ github.event.repository.owner.name}}/${{ matrix.image }}:${tag}
docker tag ${{ matrix.image }}:${tag} docker.pkg.github.com/${{ github.event.repository.owner.name }}/${{ github.event.repository.name }}/${{ matrix.image }}:${tag}
done
fi
docker push ${{ github.event.repository.owner.name}}/${{ matrix.image }}
docker push docker.pkg.github.com/${{ github.event.repository.owner.name}}/${{ github.event.repository.name }}/${{ matrix.image }}
if: github.event_name == 'push' && ( steps.is-modified.outputs.modified == 'true' || github.event.ref == 'refs/heads/re-builld-all')
4 changes: 3 additions & 1 deletion ansible/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM alpine:latest

ARG VERSION=2.9.6

RUN apk --update upgrade && \
apk add \
py-pip \
Expand All @@ -15,7 +17,7 @@ RUN apk --update upgrade && \
## Adding boto and boto3 for AWS modules. This can obviously be expanded as needed
RUN pip install --no-cache-dir \
pycparser==2.13 \
ansible \
ansible${VERSION+==$VERSION} \
boto \
boto3

Expand Down
3 changes: 2 additions & 1 deletion awscli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:alpine
RUN apk add --no-cache groff less mailcap
RUN pip install awscli
ARG VERSION=1.18.17
RUN pip install awscli${VERSION+==$VERSION}
LABEL io.whalebrew.name aws
LABEL io.whalebrew.config.environment '["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_DEFAULT_REGION", "AWS_DEFAULT_PROFILE", "AWS_CONFIG_FILE"]'
LABEL io.whalebrew.config.volumes '["~/.aws:/.aws"]'
Expand Down
3 changes: 2 additions & 1 deletion awslogs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:alpine
RUN pip install awslogs
ARG VERSION=0.8.0
RUN pip install awslogs${VERSION+==$VERSION}
LABEL io.whalebrew.name awslogs
LABEL io.whalebrew.config.environment '["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_DEFAULT_REGION", "AWS_DEFAULT_PROFILE", "AWS_CONFIG_FILE"]'
LABEL io.whalebrew.config.volumes '["~/.aws:/.aws"]'
Expand Down
3 changes: 2 additions & 1 deletion httpie/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3-alpine
RUN pip install httpie
ARG VERSION=2.0.0
RUN pip install httpie${VERSION+==$VERSION}
RUN mkdir /.httpie && echo "{}" > /.httpie/config.json
ENTRYPOINT ["http"]
8 changes: 6 additions & 2 deletions jq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FROM alpine
RUN apk add --no-cache jq
FROM alpine as build
ARG VERSION=1.6
RUN wget -O /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-${VERSION}/jq-linux64 && \
chmod +x /usr/local/bin/jq
FROM scratch
COPY --from=build /usr/local/bin/jq /usr/local/bin/jq
ENTRYPOINT ["jq"]
3 changes: 2 additions & 1 deletion proselint/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM python:3-alpine
RUN pip install proselint
ARG VERSION=
RUN pip install proselint${VERSION+==$VERSION}
ENTRYPOINT ["proselint"]
3 changes: 2 additions & 1 deletion pygmentize/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM python:3-alpine
RUN pip install pygments
ARG VERSION=2.6.1
RUN pip install pygments${VERSION+==$VERSION}
ENTRYPOINT ["pygmentize"]
3 changes: 2 additions & 1 deletion youtube-dl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3-alpine
RUN apk add --no-cache ffmpeg
RUN pip install youtube-dl
ARG VERSION=2020.3.8
RUN pip install --no-cache-dir youtube-dl${VERSION+==$VERSION}
ENTRYPOINT ["youtube-dl"]

0 comments on commit 3d2d801

Please sign in to comment.