Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed Dec 19, 2023
1 parent 9fd766f commit f7dee2e
Show file tree
Hide file tree
Showing 8 changed files with 1,880 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-copy-tag-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: build-copy-tag-action
concurrency:
group: build-copy-tag-action
on:
push:
branches:
- copy-tag
paths:
- copy-tag/src/**/*
- copy-tag/package*.json
- copy-tag/*.js

permissions:
contents: write

env:
AUTHOR_EMAIL: [email protected]
AUTHOR_NAME: 'Github Actions'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 20

- name: node modules
working-directory: ./copy-tag
run: npm ci

- name: build
working-directory: ./copy-tag
run: npm run build

- name: commit builded action
run: |
if git status | grep 'copy-tag/dist/' -q;
then
git config --global user.email "${AUTHOR_EMAIL}"
git config --global user.name "${AUTHOR_NAME}"
git add ./copy-tag/dist
git commit -m "built action"
git push origin ${{ github.ref }}:${{ github.ref }}
fi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build
name: build main action
concurrency:
group: build
group: build-main-action
on:
push:
branches:
Expand Down
25 changes: 25 additions & 0 deletions copy-tag/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'copy tag'
description: 'add tag for exist image:tag'
inputs:
registry:
description: 'registry'
required: true
registry-user:
description: 'registry'
required: true
registry-password:
description: 'registry'
required: true
from-tag:
description: 'from tag'
required: true
to-tag:
description: 'to tag'
required: true
images:
description: 'list images in Yaml format'
required: true

runs:
using: 'node20'
main: 'dist/main.js'
Loading

0 comments on commit f7dee2e

Please sign in to comment.