Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroCabeza committed Aug 22, 2024
1 parent ab4ff86 commit 6adde6b
Showing 1 changed file with 78 additions and 78 deletions.
156 changes: 78 additions & 78 deletions .github/actions/run-transport-interop-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Fetch tmp cache
uses: actions/cache@v3
id: fetch-tmp-cache
with:
path: /tmp/cache
key: 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: 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
Expand All @@ -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

# # 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
- 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
# - 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'
Expand Down

0 comments on commit 6adde6b

Please sign in to comment.