Skip to content

Bump golang from 1.22.0-alpine3.19 to 1.22.1-alpine3.19 (#45) #10

Bump golang from 1.22.0-alpine3.19 to 1.22.1-alpine3.19 (#45)

Bump golang from 1.22.0-alpine3.19 to 1.22.1-alpine3.19 (#45) #10

Workflow file for this run

name: Docker Release Tag
on:
push:
tags: ["v*.*.*"]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tag from release name
id: extract_tag
run: |
echo "tag=$(echo $GITHUB_REF | sed 's|refs/tags/v||')" >> $GITHUB_OUTPUT
- name: Tag and Push Image
run: |
export IMAGE_NAME=$(echo "$IMAGE_NAME" | awk '{print tolower($0)}')
echo $IMAGE_NAME
env
echo ${{ env.REGISTRY }}/$IMAGE_NAME:master
docker pull ${{ env.REGISTRY }}/$IMAGE_NAME:master
docker tag ${{ env.REGISTRY }}/$IMAGE_NAME:master ${{ env.REGISTRY }}/$IMAGE_NAME:${{ steps.extract_tag.outputs.tag }}
docker push ${{ env.REGISTRY }}/$IMAGE_NAME:${{ steps.extract_tag.outputs.tag }}