Skip to content

Commit

Permalink
test with diff action
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Sep 18, 2023
1 parent 336e4ef commit a245303
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/actions/build-docker-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 'Meteor Docker'

inputs:
CR_USER:
required: true
CR_PAT:
required: true
node-version:
required: true
description: 'Node version'
type: string
type:
required: false
description: 'Type of image (official or alpine)'
type: string

runs:
using: composite

steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ inputs.CR_USER }}
password: ${{ inputs.CR_PAT }}

- name: Restore build
uses: actions/download-artifact@v3
with:
name: build
path: /tmp/build

- name: Unpack build
shell: bash
run: |
cd /tmp/build
tar xzf Rocket.Chat.tar.gz
rm Rocket.Chat.tar.gz
- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true

- run: yarn build
shell: bash

- name: Build Docker images
shell: bash
run: |
args=(rocketchat)
if [[ '${{ inputs.type }}' = 'alpine' ]]; then
args+=($SERVICES_PUBLISH)
fi;
docker compose -f docker-compose-ci.yml build "${args[@]}"
- name: Publish Docker images to GitHub Container Registry
shell: bash
run: |
args=(rocketchat)
if [[ '${{ inputs.type }}' = 'alpine' ]]; then
args+=($SERVICES_PUBLISH)
fi;
docker compose -f docker-compose-ci.yml push "${args[@]}"

0 comments on commit a245303

Please sign in to comment.