Skip to content

refactor(git-actions) #1

refactor(git-actions)

refactor(git-actions) #1

Workflow file for this run

name: CI
on:
push:
branches:
- master
jobs:
cache-and-install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Generate tag
id: generate_tag
run: |
SHA=$(echo $GITHUB_SHA | head -c7)
echo "sha=$SHA" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Build Docker Image
run: docker build -t wiredworldweb/wired:${{steps.generate_tag.outputs.sha}} .
- name: Push image
run: docker push wiredworldweb/wired:${{steps.generate_tag.outputs.sha}}