Skip to content

Periodic Release

Periodic Release #7

name: Periodic Release
on:
schedule:
- cron: '0 0 * * 0' # Runs weekly
workflow_dispatch: # Allows manual triggering
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions: read-all
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
- name: Get the latest tag version
id: get_version
run: echo "TAG=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: 'Create Release'
id: create_release
uses: ncipollo/release-action@v1
with:
body: "A test of the auto releaseer for v 1.0.1-beta.1"
makeLatest: false
prerelease: true
tag: ${{ env.TAG }}
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Log into registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
build-args: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
push: false
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest