Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add docker registry #2

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "cz_customize"
version = "0.1.0"
tag_format = "v$version"
bump_message = "bump: release $current_version → $new_version [skip-ci]"
update_changelog_on_bump = true
update_changelog_on_bump = false
version_files = [
"package.json:version",
]
Expand Down
File renamed without changes.
46 changes: 38 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

permissions:
contents: write
packages: write

jobs:
bump_version:
Expand All @@ -21,25 +22,25 @@ jobs:
version: ${{ steps.cz.outputs.version }}
steps:
- name: Check out
uses: actions/checkout@v4
uses: actions/checkout@v4.1.5
with:
fetch-depth: 0
token: "${{ secrets.ACCESS_TOKEN }}"
ref: "main"

- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.11

- name: Config Git User
run: |
git config --local user.email "$GIT_USER_EMAIL"
git config --local user.name "$GIT_USER_NAME"
git config --local pull.ff only

- id: cz
name: Create bump and changelog
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.11

- name: Create bump and changelog
id: cz
run: |
python -m pip install -U commitizen
cz bump --yes
Expand All @@ -57,3 +58,32 @@ jobs:

- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"

build:
runs-on: ubuntu-latest
needs:
- bump_version
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
logout: false

- name: Set repo name
run: |
repo=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "REPO=$repo" >> $GITHUB_ENV

- name: Build and push
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ env.REPO }}:latest --push .
docker buildx build --platform linux/amd64,linux/arm64 -t ${{ env.REPO }}:${{ needs.bump_version.outputs.version }} --push .
File renamed without changes.
24 changes: 0 additions & 24 deletions CHANGELOG.md

This file was deleted.

10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM node:20
FROM node:20-alpine

LABEL "com.github.actions.icon"="blue"
LABEL "com.github.actions.color"="database"
LABEL "com.github.actions.name"="json-diff-action"
LABEL "com.github.actions.description"="Check for differences between at least 2 json files and show what member is missing by each file."
LABEL "org.opencontainers.image.source"="https://github.com/Drafteame/json-diff-action"

COPY . /action
WORKDIR /action

RUN npm install --production
RUN npm install --omit=dev

ENTRYPOINT ["node", "/action/index.js"]
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "json-diff-action"

description: "Check for differences between at least 2 json files and show what member is missing by each file."

branding:
Expand Down
Loading