Containers #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Containers | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build and push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Build and push container | |
uses: coreos/actions-lib/build-container@main | |
with: | |
credentials: ${{ secrets.QUAY_AUTH }} | |
push: quay.io/coreos/mkpasswd | |
- name: Update README | |
run: | | |
# This is load-bearing: GitHub will disable the job if the repo | |
# doesn't stay active. Do not enable branch protection for main; | |
# it'll break this. | |
git config user.name 'CoreOS Bot' | |
git config user.email [email protected] | |
sed -i "s/updated-.*-green/updated-$(date +%Y--%m--%d)-green/" README.md | |
git add README.md | |
if git diff --quiet --staged --exit-code; then | |
echo "README.md already up to date" | |
exit 0 | |
fi | |
git commit -m "README: update build date" | |
git push |