Skip to content

Commit

Permalink
Add VERSION argument to python packages (#79)
Browse files Browse the repository at this point in the history
* Add VERSION argument to python packages

First step in fixing #33

* Group output by image tag

* Add image tag list
  • Loading branch information
tjamet authored Mar 9, 2020
1 parent 2e2a204 commit e8a7cb0
Show file tree
Hide file tree
Showing 18 changed files with 124 additions and 10 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,28 @@ jobs:
- uses: actions/checkout@v1
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 }}
echo ::group::build image ${{ matrix.image }}:latest
docker build -t ${{ matrix.image }} ${{ matrix.image }}
echo ::endgroup::
if [ -e "${{ matrix.image }}/tags.yaml" ]; then
for tag in $(cat "${{ matrix.image }}/tags.yaml" | docker run --rm -i whalebrew/yq -r '.versions[]'); do
echo ::group::build image ${{ matrix.image }}:${tag}
docker build -t ${{ matrix.image }}:${tag} --build-arg VERSION=${tag} ${{ matrix.image }}
echo ::endgroup::
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
19 changes: 19 additions & 0 deletions ansible/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
versions:
- 2.8.0
- 2.8.1
- 2.8.10
- 2.8.2
- 2.8.3
- 2.8.4
- 2.8.5
- 2.8.6
- 2.8.7
- 2.8.8
- 2.8.9
- 2.9.0
- 2.9.1
- 2.9.2
- 2.9.3
- 2.9.4
- 2.9.5
- 2.9.6
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
37 changes: 37 additions & 0 deletions awscli/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
versions:
- 1.8.0
- 1.8.1
- 1.8.10
- 1.8.11
- 1.8.12
- 1.8.13
- 1.8.2
- 1.8.3
- 1.8.4
- 1.8.5
- 1.8.6
- 1.8.7
- 1.8.8
- 1.8.9
- 1.9.0
- 1.9.1
- 1.9.10
- 1.9.11
- 1.9.12
- 1.9.13
- 1.9.14
- 1.9.15
- 1.9.16
- 1.9.17
- 1.9.18
- 1.9.19
- 1.9.2
- 1.9.20
- 1.9.21
- 1.9.3
- 1.9.4
- 1.9.5
- 1.9.6
- 1.9.7
- 1.9.8
- 1.9.9
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: 3 additions & 0 deletions awslogs/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
- 0.7.0
- 0.8.0
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"]
5 changes: 5 additions & 0 deletions httpie/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
versions:
- 1.0.0
- 1.0.2
- 1.0.3
- 2.0.0
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: 3 additions & 0 deletions jq/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
- 1.5
- 1.6
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=0.9.0
RUN pip install proselint${VERSION+==$VERSION}
ENTRYPOINT ["proselint"]
3 changes: 3 additions & 0 deletions proselint/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
- 0.8.0
- 0.9.0
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"]
5 changes: 5 additions & 0 deletions pygmentize/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
versions:
- 2.5.1
- 2.5.2
- 2.6.0
- 2.6.1
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"]
8 changes: 8 additions & 0 deletions youtube-dl/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
versions:
- 2020.1.1
- 2020.1.15
- 2020.1.24
- 2020.2.16
- 2020.3.1
- 2020.3.6
- 2020.3.8
4 changes: 4 additions & 0 deletions yq/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
versions:
- 2.8.0
- 2.8.1
- 2.9.2

0 comments on commit e8a7cb0

Please sign in to comment.