feat(action): run on Github without Docker #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Action | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- action/** | |
- action.yml | |
branches: | |
- main | |
- gha | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18.20.4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
id: pnpm-install | |
with: | |
version: 9.12.3 | |
run_install: true | |
- name: Build Action | |
working-directory: ./action | |
run: pnpm build:standalone | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: "-f ./action/build/action.cjs" | |
message: "fix(action): build gha" | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_LINGODOTDEV_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_LINGODOTDEV_PASSWORD }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
platforms: linux/amd64 | |
context: ./action | |
file: ./action/Dockerfile | |
tags: ${{ secrets.DOCKERHUB_LINGODOTDEV_USERNAME }}/ci-action:latest |