wip
This commit is contained in:
parent
ab4ff865b1
commit
6adde6b6a3
|
@ -36,38 +36,38 @@ inputs:
|
|||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: List caches via API
|
||||
shell: bash
|
||||
run: |
|
||||
ENDPOINT=${{ github.api_url }}/repos/${{ github.repository }}/actions/caches
|
||||
# curl -L \
|
||||
# $ENDPOINT
|
||||
# curl -L \
|
||||
# $ENDPOINT/my-tmp-cache
|
||||
# - name: List caches via API
|
||||
# shell: bash
|
||||
# run: |
|
||||
# ENDPOINT=${{ github.api_url }}/repos/${{ github.repository }}/actions/caches
|
||||
# curl -L \
|
||||
# $ENDPOINT
|
||||
# # curl -L \
|
||||
# # $ENDPOINT/my-tmp-cache
|
||||
|
||||
- name: Fetch tmp cache
|
||||
uses: actions/cache@v3
|
||||
id: fetch-tmp-cache
|
||||
with:
|
||||
path: /tmp/cache
|
||||
key: my-tmp-cache
|
||||
# - name: Fetch tmp cache
|
||||
# uses: actions/cache@v3
|
||||
# id: fetch-tmp-cache
|
||||
# with:
|
||||
# path: /tmp/cache
|
||||
# key: my-tmp-cache
|
||||
|
||||
- name: Create tmp cache if not exists
|
||||
shell: bash
|
||||
if: steps.fetch-tmp-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p /tmp/cache
|
||||
echo "Hello, World!" > /tmp/cache/hello.txt
|
||||
# - name: Create tmp cache if not exists
|
||||
# shell: bash
|
||||
# if: steps.fetch-tmp-cache.outputs.cache-hit != 'true'
|
||||
# run: |
|
||||
# mkdir -p /tmp/cache
|
||||
# echo "Hello, World!" > /tmp/cache/hello.txt
|
||||
|
||||
- name: Get values
|
||||
shell: bash
|
||||
run: |
|
||||
echo ${{ github.api_url }}
|
||||
echo ${{ github.event_name }}
|
||||
echo ${{ github.repository }}
|
||||
echo ${{ github.repositoryUrl }}
|
||||
SECRET=${{ github.token }}
|
||||
echo ${SECRET:0:4}
|
||||
# - name: Get values
|
||||
# shell: bash
|
||||
# run: |
|
||||
# echo ${{ github.api_url }}
|
||||
# echo ${{ github.event_name }}
|
||||
# echo ${{ github.repository }}
|
||||
# echo ${{ github.repositoryUrl }}
|
||||
# SECRET=${{ github.token }}
|
||||
# echo ${SECRET:0:4}
|
||||
|
||||
# - name: Restore image from cache
|
||||
# id: deps-cache
|
||||
|
@ -80,60 +80,60 @@ runs:
|
|||
|
||||
# -----< CACHED STEPS >-----
|
||||
|
||||
# - name: Configure AWS credentials for S3 build cache
|
||||
# if: inputs.s3-access-key-id != '' && inputs.s3-secret-access-key != ''
|
||||
# run: |
|
||||
# echo "PUSH_CACHE=true" >> $GITHUB_ENV
|
||||
# shell: bash
|
||||
- name: Configure AWS credentials for S3 build cache
|
||||
if: inputs.s3-access-key-id != '' && inputs.s3-secret-access-key != ''
|
||||
run: |
|
||||
echo "PUSH_CACHE=true" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
# # This depends on where this file is within this repository. This walks up
|
||||
# # from here to the transport-interop folder
|
||||
# - run: |
|
||||
# WORK_DIR=$(realpath "$GITHUB_ACTION_PATH/../../../transport-interop")
|
||||
# echo "WORK_DIR=$WORK_DIR" >> $GITHUB_OUTPUT
|
||||
# shell: bash
|
||||
# id: find-workdir
|
||||
# This depends on where this file is within this repository. This walks up
|
||||
# from here to the transport-interop folder
|
||||
- run: |
|
||||
WORK_DIR=$(realpath "$GITHUB_ACTION_PATH/../../../transport-interop")
|
||||
echo "WORK_DIR=$WORK_DIR" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
id: find-workdir
|
||||
|
||||
# - uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 18
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
# # Existence of /etc/buildkit/buildkitd.toml indicates that this is a
|
||||
# # self-hosted runner. If so, we need to pass the config to the buildx
|
||||
# # action. The config enables docker.io proxy which is required to
|
||||
# # work around docker hub rate limiting.
|
||||
# - run: |
|
||||
# if test -f /etc/buildkit/buildkitd.toml; then
|
||||
# echo "config=/etc/buildkit/buildkitd.toml" >> $GITHUB_OUTPUT
|
||||
# fi
|
||||
# shell: bash
|
||||
# id: buildkit
|
||||
# Existence of /etc/buildkit/buildkitd.toml indicates that this is a
|
||||
# self-hosted runner. If so, we need to pass the config to the buildx
|
||||
# action. The config enables docker.io proxy which is required to
|
||||
# work around docker hub rate limiting.
|
||||
- run: |
|
||||
if test -f /etc/buildkit/buildkitd.toml; then
|
||||
echo "config=/etc/buildkit/buildkitd.toml" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
id: buildkit
|
||||
|
||||
# - name: Set up Docker Buildx
|
||||
# id: buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
# with:
|
||||
# config: ${{ steps.buildkit.outputs.config }}
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
config: ${{ steps.buildkit.outputs.config }}
|
||||
|
||||
# - name: Install deps
|
||||
# working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
# run: npm ci
|
||||
# shell: bash
|
||||
- name: Install deps
|
||||
working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
# - name: Load cache and build
|
||||
# working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
# run: npm run cache -- load
|
||||
# shell: bash
|
||||
- name: Load cache and build
|
||||
working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
run: npm run cache -- load
|
||||
shell: bash
|
||||
|
||||
# - name: Assert Git tree is clean.
|
||||
# working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
# shell: bash
|
||||
# run: |
|
||||
# if [[ -n "$(git status --porcelain)" ]]; then
|
||||
# echo "Git tree is dirty. This means that building an impl generated something that should probably be .gitignore'd"
|
||||
# git status
|
||||
# exit 1
|
||||
# fi
|
||||
- name: Assert Git tree is clean.
|
||||
working-directory: ${{ steps.find-workdir.outputs.WORK_DIR }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -n "$(git status --porcelain)" ]]; then
|
||||
echo "Git tree is dirty. This means that building an impl generated something that should probably be .gitignore'd"
|
||||
git status
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# - name: Push the image cache
|
||||
# if: env.PUSH_CACHE == 'true'
|
||||
|
|
Loading…
Reference in New Issue