Skip to content

Commit

Permalink
Add composite action push_image_by_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Feb 1, 2024
1 parent e1f2ef9 commit deab587
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/actions/push_image_by_tag/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: push_image_by_tag
inputs:
push_tags:
required: false
runs:
using: composite
steps:
- name: Push docker image to rubylang
run: |-
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
push_tags="${{ inputs.push_tags }}"
for tag in $push_tags; do
docker push rubylang/ruby:$tag
done
shell: bash
- name: Push docker image to ghcr.io/ruby
run: |-
echo $GHCR_ACCESS_TOKEN | docker login ghcr.io -u $GITHUB_USER --password-stdin
push_tags="${{ inputs.push_tags }}"
for tag in $push_tags; do
docker tag rubylang/ruby:$tag ghcr.io/ruby/ruby:$tag
docker push ghcr.io/ruby/ruby:$tag
done
shell: bash

0 comments on commit deab587

Please sign in to comment.