Skip to content

Hugo version v0.134.2 #89

Hugo version v0.134.2

Hugo version v0.134.2 #89

Workflow file for this run

name: Docker Image release
on:
release:
types:
- released
jobs:
BuildImages:
runs-on: floryn90-runners
steps:
- name: Install curl & gpg
shell: bash
run: sudo apt update && sudo apt -y install curl gpg jq git && sudo apt clean
- name: Clean Workspace
uses: AutoModality/action-clean@v1
- name: Checkout
uses: actions/checkout@v4
- name: Install build essential
shell: bash
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt-get install dirmngr -y
sudo apt-get update
sudo apt-get install gh build-essential wget -y
sudo apt-get autoclean
sudo apt-get autoremove
sudo rm -rf /var/lib/apt/lists/*
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
uses: docker/login-action@v3
with:
username: floryn90
password: ${{ secrets.DOCKER_TOKEN }}
- name: Get previous release tag
id: release_tag
shell: bash
run: |
releases=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/gohugoio/hugo/releases?per_page=1&page=1)
release_tag=$(echo $releases | jq '.[1].tag_name' | sed 's/v//g' | sed 's/"//g')
echo "Latest release tag is ${release_tag}"
echo "latest_release_tag=${release_tag}" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.TOKEN_GITHUB }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: floryn90/hugo
- name: Prepare
shell: bash
run: make prepare
- name: Build
shell: bash
run: make build
- name: Upload target content
uses: actions/upload-artifact@v4
with:
name: target
path: target
- name: Push images
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: make push-release
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: floryn90
password: ${{ secrets.DOCKER_TOKEN }}
repository: floryn90/hugo