Skip to content

v2.0.1

v2.0.1 #14

Workflow file for this run

name: Promote Images to DockerHub
on:
workflow_dispatch:
release:
types:
- published
jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout Automation Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Latest Tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: Get Repo Name
id: variables_step
run: |
echo "repo_name=${GITHUB_REPOSITORY#*/}" >> "$GITHUB_OUTPUT"
- name: Promote to DockerHub
env:
ARTIFACTORY_CONTAINER_PROD: ${{ vars.ARTIFACTORY_CONTAINER_PROD }}
run: |
docker buildx imagetools create \
--tag "docker.io/aerospike/${{ steps.variables_step.outputs.repo_name }}:$(echo ${{ steps.get-latest-tag.outputs.tag }} | cut -c 2-)" \
--tag "docker.io/aerospike/${{ steps.variables_step.outputs.repo_name }}:latest" \
"aerospike.jfrog.io/$ARTIFACTORY_CONTAINER_PROD/${{ steps.variables_step.outputs.repo_name }}:$(echo ${{ steps.get-latest-tag.outputs.tag }} | cut -c 2-)"