docs #1103
This file contains 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: CI | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- uses: golangci/golangci-lint-action@v6.1.1 | |
- run: make download | |
- run: make test | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
install-only: true | |
- uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- name: Run make install | |
run: make INSTALL=install BIN=$RUNNER_TEMP | |
- name: Set path | |
run: echo $RUNNER_TEMP >> $GITHUB_PATH | |
# See https://cloud.google.com/build/docs/configuring-builds/run-bash-scripts. | |
- name: Run forge cloudbuild --script noshebang | |
run: | | |
forge cloudbuild alpine --script testdata/cloudbuild/scripts/sh | |
- name: Run forge cloudbuild --script bash | |
run: | | |
forge cloudbuild bash --script testdata/cloudbuild/scripts/bash | |
- name: Run forge cloudbuild --script node | |
run: | | |
forge cloudbuild node:20 --script testdata/cloudbuild/scripts/node | |
# See https://cloud.google.com/build/docs/building/build-containers. | |
- name: Run forge cloudbuild docker | |
run: | | |
forge --no-sock cloudbuild gcr.io/cloud-builders/docker build testdata/actions/dockerfile | |
- name: Run forge use remote | |
run: forge use frantjc/forge/testdata/actions/docker@${{ github.sha }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run forge use local | |
run: forge --no-dind use ./testdata/actions/node | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run forge use dockerfile | |
run: forge use ./testdata/actions/dockerfile | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run forge use . | |
run: | | |
cd ./testdata/actions/node | |
forge use . | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run forge use dind | |
run: forge use frantjc/forge/testdata/actions/dind@${{ github.sha }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Run forge check resource | |
run: forge --no-dind check mock -v version=v0.0.0 | |
- name: Run forge get resource | |
run: forge get mock -v version=v0.0.0 | |
- name: Run forge put resource | |
run: forge put mock -v version=v0.0.0 -p version=v0.0.0 | |
- name: Test forge.sock | |
run: | | |
forge cloudbuild gcr.io/cloud-builders/docker build testdata/actions/dockerfile | |
- run: forge cache --clean |