Update alpine Docker tag to v3.20.1 #72
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: Release image | |
on: | |
push: | |
branches: | |
- main | |
- renovate/** | |
pull_request: | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
get-versions: | |
name: Build and push image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract samba version | |
id: samba | |
run: | | |
echo "version=$(sed -nr 's/^ARG SAMBA_VERSION=(.*)$/\1/p' Dockerfile)" >> "$GITHUB_OUTPUT" | |
- name: Extract alpine version | |
id: alpine | |
run: | | |
echo "version=$(grep -oE 'alpine:([^ ]+)' Dockerfile | head -1 | cut -d: -f2)" >> "$GITHUB_OUTPUT" | |
- name: Generate tag | |
id: tag | |
run: | | |
echo "bare=v${{ steps.samba.outputs.version }}" >> "$GITHUB_OUTPUT" | |
echo "distro=v${{ steps.samba.outputs.version }}-alpine${{ steps.alpine.outputs.version }}" >> "$GITHUB_OUTPUT" | |
echo "full=v${{ steps.samba.outputs.version }}-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
outputs: | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/samba-docker/samba:${{ steps.tag.outputs.bare }} | |
ghcr.io/${{ github.repository_owner }}/samba-docker/samba:${{ steps.tag.outputs.distro }} | |
ghcr.io/${{ github.repository_owner }}/samba-docker/samba:${{ steps.tag.outputs.full }} | |
release-image: | |
needs: [ get-versions ] | |
uses: txqueuelen/.github/.github/workflows/common-docker-releaser.yaml@main | |
with: | |
tags: ${{ needs.get-versions.outputs.tags }} | |
push: ${{ github.ref_name == github.event.repository.default_branch }} | |
secrets: | |
token: ${{ secrets.GITHUB_TOKEN }} |