Skip to content

Commit

Permalink
Drop Debian Jessie and Stretch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jun 5, 2022
1 parent 1b425c0 commit 8c2e565
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 429 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/
213 changes: 0 additions & 213 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1596,216 +1596,3 @@ jobs:
push: true
tags: ${{ steps.prep.outputs.tags }}

debian-stretch:
env:
RELEASE: stretch
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare
id: prep
run: |
DOCKER_IMAGE=${GITHUB_REPOSITORY/docker-/}
set -x
if [[ $GITHUB_REF == refs/heads/* ]]; then
if [[ $GITHUB_REF == refs/heads/*/* ]] ; then
BRANCH="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed "s|refs/heads/||g" | sed "s|/|-|g")"
else
BRANCH=${GITHUB_REF#refs/heads/}
fi
case ${BRANCH} in
"main" | "master" )
BRANCHTAG="${DOCKER_IMAGE}:debian-${RELEASE},${DOCKER_IMAGE}:debian-${RELEASE}-latest"
;;
"develop" )
BRANCHTAG="${DOCKER_IMAGE}:debian-${RELEASE}-develop"
;;
* )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${BRANCHTAG}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest"
fi
;;
esac
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:debian-${RELEASE}-$(echo $GITHUB_REF | sed 's|refs/tags/||g')"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
TAGS=${BRANCHTAG},${GITTAG}
else
TAGS="${BRANCHTAG}${GITTAG}"
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Label
id: Label
run: |
if [ -f "Dockerfile" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_repository=\"https://github.com/${GITHUB_REPOSITORY}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_commit=\"${GITHUB_SHA}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_committed_by=\"${GITHUB_ACTOR}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.image_build_date=\"$(date +'%Y-%m-%d %H:%M:%S')\"" Dockerfile.debian
if [ -f "CHANGELOG.md" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_changelog_version=\"$(head -n1 ./CHANGELOG.md | awk '{print $2}')\"" Dockerfile.debian
mkdir -p install/assets/.changelogs ; cp CHANGELOG.md install/assets/.changelogs/${GITHUB_REPOSITORY/\//_}.md
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_tag=\"${GITHUB_REF#refs/tags/v}\"" Dockerfile.debian
fi
if [[ $GITHUB_REF == refs/heads/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_branch=\"${GITHUB_REF#refs/heads/}\"" Dockerfile.debian
fi
fi
- name: Switch
id: Switch
run: |
sed -i "s|FROM docker.io/tiredofit/debian:.*|FROM docker.io/tiredofit/debian:stretch|g" Dockerfile.debian
- name: Build
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.debian
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.prep.outputs.tags }}

debian-jessie:
env:
RELEASE: jessie
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare
id: prep
run: |
DOCKER_IMAGE=${GITHUB_REPOSITORY/docker-/}
set -x
if [[ $GITHUB_REF == refs/heads/* ]]; then
if [[ $GITHUB_REF == refs/heads/*/* ]] ; then
BRANCH="${DOCKER_IMAGE}:$(echo $GITHUB_REF | sed "s|refs/heads/||g" | sed "s|/|-|g")"
else
BRANCH=${GITHUB_REF#refs/heads/}
fi
case ${BRANCH} in
"main" | "master" )
BRANCHTAG="${DOCKER_IMAGE}:debian-${RELEASE},${DOCKER_IMAGE}:debian-${RELEASE}-latest"
;;
"develop" )
BRANCHTAG="${DOCKER_IMAGE}:debian-${RELEASE}-develop"
;;
* )
if [ -n "${{ secrets.LATEST }}" ] ; then
if [ "${BRANCHTAG}" = "${{ secrets.LATEST }}" ]; then
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest,${DOCKER_IMAGE}:latest"
else
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest"
fi
else
BRANCHTAG="${DOCKER_IMAGE}:${BRANCH},${DOCKER_IMAGE}:${BRANCH}-latest"
fi
;;
esac
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
GITTAG="${DOCKER_IMAGE}:debian-${RELEASE}-$(echo $GITHUB_REF | sed 's|refs/tags/||g')"
fi
if [ -n "${BRANCHTAG}" ] && [ -n "${GITTAG}" ]; then
TAGS=${BRANCHTAG},${GITTAG}
else
TAGS="${BRANCHTAG}${GITTAG}"
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Label
id: Label
run: |
if [ -f "Dockerfile" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_repository=\"https://github.com/${GITHUB_REPOSITORY}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_commit=\"${GITHUB_SHA}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_committed_by=\"${GITHUB_ACTOR}\"" Dockerfile.debian
sed -i "/FROM .*/a LABEL tiredofit.nginx.image_build_date=\"$(date +'%Y-%m-%d %H:%M:%S')\"" Dockerfile.debian
if [ -f "CHANGELOG.md" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_changelog_version=\"$(head -n1 ./CHANGELOG.md | awk '{print $2}')\"" Dockerfile.debian
mkdir -p install/assets/.changelogs ; cp CHANGELOG.md install/assets/.changelogs/${GITHUB_REPOSITORY/\//_}.md
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_tag=\"${GITHUB_REF#refs/tags/v}\"" Dockerfile.debian
fi
if [[ $GITHUB_REF == refs/heads/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.nginx.git_branch=\"${GITHUB_REF#refs/heads/}\"" Dockerfile.debian
fi
fi
- name: Switch
id: Switch
run: |
sed -i "s|FROM docker.io/tiredofit/debian:.*|FROM docker.io/tiredofit/debian:${RELEASE}|g" Dockerfile.debian
- name: Build
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.debian
platforms: linux/amd64,linux/arm/v7
push: true
tags: ${{ steps.prep.outputs.tags }}
Loading

0 comments on commit 8c2e565

Please sign in to comment.