Skip to content

Revert failing heredoc #54

Revert failing heredoc

Revert failing heredoc #54

name: Skaffold
on: [push]
jobs:
build:
name: Skaffold Build
runs-on: ubuntu-22.04
container:
image: gcr.io/k8s-skaffold/skaffold:v2.6.3-lts
# env:
# NODE_ENV: development
# ports:
# - 80
# volumes:
# - my_docker_volume:/volume_mount
# options: --cpus 1
env:
SKAFFOLD_DEFAULT_REPO: docker.io/snickellcdo
BASE_COMMIT: 1e5e6230c17e962fc49c8f0e6b833845db816a49
steps:
- run: |
echo hi
echo "SKAFFOLD_DEFAULT_REPO=$SKAFFOLD_DEFAULT_REPO"
echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ vars.K8S_DOCKEHUB_REPOSITORY }}
username: ${{ vars.K8S_DOCKERHUB_USERNAME }}
password: ${{ secrets.K8S_DOCKERHUB_TOKEN }}
# # Pin a base git commit, and cache it + fastforward to the current commit to
# # speedup git checkout
#
# - name: Restore Cache of Git Fetch
# id: cache-git-fetch-restore
# uses: actions/cache/restore@v3
# with:
# path: "${{ github.workspace }}/.git"
# key: git-fetch-${{ hashFiles('**/FETCH_HEAD') }}
# - run: |
# # git clone --branch $DRONE_SOURCE_BRANCH --depth 1 $DRONE_GIT_HTTP_URL .
# git init
# git remote origin add https://github.com/code-dot-org/code-dot-org.git
# git fetch --depth=1 origin $BASE_COMMIT
# git checkout $BASE_COMMIT
# - name: Save Cache of Git Fetch
# id: cache-git-fetch-save
# uses: actions/cache/save@v3
# with:
# path: "${{ github.workspace }}/.git"
# key: git-fetch-${{ hashFiles('**/FETCH_HEAD') }}
# - run: |
# # FIXME: here is where (instead of actions/checkout@v3) we would use our
# # existing .git/ checkout to $BASE_COMMIT, and fast-forward it to
# # $GITHUB_SHA or $GITHUB_WORKFLOW_SHA instead of doing a raw checkout of sources
# #
# # These commands are NOT right, they re-download everything.... what IS right?
# git fetch --depth=1 origin $GITHUB_WORKFLOW_SHA
# git checkout $GITHUB_WORKFLOW_SHA
- name: Checkout sources
uses: actions/checkout@v3
- name: Skaffold Cache
uses: actions/cache@v3
with:
path: "${{ github.workspace }}/.skaffold/cache"
key: skaffold-${{ hashFiles('**/cache') }}
restore-keys: |
skaffold-
- run: |
skaffold build \
--push \
&& true
# quicktest:
# name: Quick Test
# runs-on: ubuntu-22.04
# # container:
# # image: alpine
# steps:
# - run: |
# env
# git clone https://github.com/code-dot-org/code-dot-org.git
# env
# echo hi
# echo "DIRECT K8S_DOCKERHUB_REPOSITORY=$K8S_DOCKERHUB_REPOSITORY"
# echo "K8S_DOCKEHUB_REPOSITORY=${{ vars.K8S_DOCKEHUB_REPOSITORY }}"
# echo "SKAFFOLD_DEFAULT_REPO=$SKAFFOLD_DEFAULT_REPO"
# echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
# env:
# SKAFFOLD_DEFAULT_REPO: ${{ vars.K8S_DOCKEHUB_REPOSITORY }}
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# registry: ${{ secrets.K8S_DOCKEHUB_REPOSITORY }}
# username: ${{ secrets.K8S_DOCKERHUB_USERNAME }}
# password: ${{ secrets.K8S_DOCKERHUB_TOKEN }}