-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add composite action push_image_by_tag
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
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 |