Skip to content

Commit

Permalink
feat: add build and pusblish in registry job
Browse files Browse the repository at this point in the history
  • Loading branch information
dcristaldo committed Apr 16, 2024
1 parent 6285d0f commit 19125e8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
17 changes: 15 additions & 2 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,14 +22,14 @@ jobs:
version: ${{ steps.cz.outputs.version }}
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.ACCESS_TOKEN }}"
ref: "main"

- name: Set up Python
uses: actions/setup-python@v4.7.0
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11

Expand Down Expand Up @@ -57,3 +58,15 @@ jobs:

- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
build:
runs-on: ubuntu-latest
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t $(echo "ghcr.io/${{ github.repository }}:latest" | tr '[:upper:]' '[:lower:]') --push .
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM node:20

LABEL "com.github.actions.icon"="blue"
LABEL "com.github.actions.color"="database"
LABEL "com.github.actions.name"="ejson action"
LABEL "com.github.actions.description"="Execute encryption and decryption of json files using ejson"
LABEL "org.opencontainers.image.source"="https://github.com/Drafteame/ejson-action"

RUN curl -sLo ejson.tar.gz https://github.com/Shopify/ejson/releases/download/v1.4.1/ejson_1.4.1_linux_amd64.tar.gz && \
tar xfvz ejson.tar.gz && \
mv ejson /usr/local/bin/ && \
Expand Down

0 comments on commit 19125e8

Please sign in to comment.