Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
268 changes: 268 additions & 0 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,73 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-20-pingme
run: |
set -e

# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )

# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )

# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="3.20-pingme"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 3.20-pingme - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/3.20-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.20-pingme - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/3.20-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.20-pingme - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/3.20-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-20-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-20-iptables
Expand Down Expand Up @@ -532,6 +599,73 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-17-pingme
run: |
set -e

# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )

# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )

# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="3.17-pingme"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 3.17-pingme - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/3.17-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.17-pingme - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/3.17-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.17-pingme - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/3.17-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-17-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-17-iptables
Expand Down Expand Up @@ -852,6 +986,73 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-15-pingme
run: |
set -e

# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )

# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )

# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="3.15-pingme"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 3.15-pingme - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/3.15-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.15-pingme - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/3.15-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.15-pingme - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/3.15-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-15-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-15-iptables
Expand Down Expand Up @@ -1172,6 +1373,73 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-12-pingme
run: |
set -e

# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )

# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )

# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="3.12-pingme"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"

# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT

- name: 3.12-pingme - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/3.12-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.12-pingme - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/3.12-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 3.12-pingme - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/3.12-pingme
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-3-12-pingme.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# This step generates the docker tags
- name: Prepare
id: prep-3-12-iptables
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: cron
on:
schedule:
# Run daily
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-versions:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# Admin user must generate a Personal Access Token with 'workflow' permissions, and used to populate the secret named WORKFLOW_TOKEN.
# See: https://stackoverflow.com/questions/68811838/refusing-to-allow-a-personal-access-token-to-create-or-update-workflow
# See: https://stackoverflow.com/questions/66643917/refusing-to-allow-a-github-app-to-create-or-update-workflow
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_TOKEN }} # This configures the git repo to use this token
fetch-depth: 0 # Fetch all branches and tags
- shell: pwsh
run: |
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ Dockerized alpine with useful tools.
|:-------:|:---------:|
| `:3.20-curl-git-jq-ssh`, `:latest` | [View](variants/3.20-curl-git-jq-ssh) |
| `:3.20-curl-mysqlclient-openssl` | [View](variants/3.20-curl-mysqlclient-openssl) |
| `:3.20-pingme` | [View](variants/3.20-pingme) |
| `:3.20-iptables` | [View](variants/3.20-iptables) |
| `:3.20-rsync` | [View](variants/3.20-rsync) |
| `:3.17-curl-git-jq-ssh` | [View](variants/3.17-curl-git-jq-ssh) |
| `:3.17-curl-mysqlclient-openssl` | [View](variants/3.17-curl-mysqlclient-openssl) |
| `:3.17-pingme` | [View](variants/3.17-pingme) |
| `:3.17-iptables` | [View](variants/3.17-iptables) |
| `:3.17-rsync` | [View](variants/3.17-rsync) |
| `:3.15-curl-git-jq-ssh` | [View](variants/3.15-curl-git-jq-ssh) |
| `:3.15-curl-mysqlclient-openssl` | [View](variants/3.15-curl-mysqlclient-openssl) |
| `:3.15-pingme` | [View](variants/3.15-pingme) |
| `:3.15-iptables` | [View](variants/3.15-iptables) |
| `:3.15-rsync` | [View](variants/3.15-rsync) |
| `:3.12-curl-git-jq-ssh` | [View](variants/3.12-curl-git-jq-ssh) |
| `:3.12-curl-mysqlclient-openssl` | [View](variants/3.12-curl-mysqlclient-openssl) |
| `:3.12-pingme` | [View](variants/3.12-pingme) |
| `:3.12-iptables` | [View](variants/3.12-iptables) |
| `:3.12-rsync` | [View](variants/3.12-rsync) |

Expand Down
Loading