Bump github.com/docker/docker in /src (#54) #14
Workflow file for this run
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: 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 }} |