weekly-container-update #44
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
on: | |
schedule: | |
- cron: '45 2 * * 5' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
name: weekly-container-update | |
jobs: | |
container-update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cardinalby/git-get-release-action@v1 | |
id: get_release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
latest: true | |
- name: Split version | |
env: | |
TAG: ${{ steps.get_release.outputs.tag_name }} | |
id: release | |
run: | | |
echo major=`echo ${TAG:1} | cut -d'.' -f1` >> $GITHUB_OUTPUT | |
echo minor=`echo ${TAG:1} | cut -d'.' -f2` >> $GITHUB_OUTPUT | |
echo patch=`echo ${TAG:1} | cut -d'.' -f3` >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: smtp-relay | |
tags: latest v${{ steps.release.outputs.major }} v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} | |
archs: amd64, arm64 | |
dockerfiles: | | |
./Dockerfile | |
- name: Push To docker.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: docker.io/loopingz | |
username: loopingz | |
password: ${{ secrets.DOCKER_HUB }} |