package-lock.json to make build process "coffee" work #122
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: CD | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
container-fylr: | |
name: fylr container building | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup SSH Agent | |
shell: bash | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "${{ secrets.PrivateKey }}" | |
- name: checkout code | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: setup SSH-Agent and get submodules | |
shell: bash | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
git submodule update --init --recursive | |
- name: login to docker.fylr.io | |
shell: bash | |
env: | |
FYLR_DOCKER_REGISTRY_LOGIN: ${{ secrets.FYLR_DOCKER_REGISTRY_LOGIN }} | |
FYLR_DOCKER_REGISTRY_PASSWORD: ${{ secrets.FYLR_DOCKER_REGISTRY_PASSWORD }} | |
FYLR_DOCKER_REGISTRY_ADDRESS: ${{ secrets.FYLR_DOCKER_REGISTRY_ADDRESS }} | |
run: echo "$FYLR_DOCKER_REGISTRY_PASSWORD" | docker login $FYLR_DOCKER_REGISTRY_ADDRESS -u $FYLR_DOCKER_REGISTRY_LOGIN --password-stdin | |
- name: Set github branch name | |
id: gh_branch_name | |
run: echo '::set-output name=branch_name::$(echo ${GITHUB_REF#refs/heads/} | sed -e "s#[/_\~*+.:;,\#]#-#g")' | |
- name: Build the container | |
shell: bash | |
env: | |
GITHUB_COMMIT_SHA: ${{ github.sha }} | |
FYLR_DOCKER_REGISTRY_ADDRESS: ${{ secrets.FYLR_DOCKER_REGISTRY_ADDRESS }} | |
run: | | |
docker build -t $FYLR_DOCKER_REGISTRY_ADDRESS/fylr-priv/fylr-plugins:${{ steps.gh_branch_name.outputs.branch_name }} --label "$GITHUB_COMMIT_SHA" -f Dockerfile . | |
- name: push the container | |
shell: bash | |
env: | |
FYLR_DOCKER_REGISTRY_ADDRESS: ${{ secrets.FYLR_DOCKER_REGISTRY_ADDRESS }} | |
run: | | |
docker push $FYLR_DOCKER_REGISTRY_ADDRESS/fylr-priv/fylr-plugins:${{ steps.gh_branch_name.outputs.branch_name }} | |
echo "container sha: $(docker inspect --format='{{index .RepoDigests 0}}' $FYLR_DOCKER_REGISTRY_ADDRESS/fylr-priv/fylr-plugins:${{ steps.gh_branch_name.outputs.branch_name }})" |