Skip to content

Commit

Permalink
pkg upgrades & github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Jul 18, 2023
1 parent 011c5ae commit 7a33c07
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 159 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
36 changes: 36 additions & 0 deletions .github/workflows/push.yml
@@ -0,0 +1,36 @@
name: docker-based-ci
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set ENV variables
run: |
echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
echo "REPO_OWNER=$(echo ${GITHUB_REPOSITORY%/*})" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${GITHUB_REPOSITORY#*/})" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
echo "DOCKER_TAG=$(echo ${GITHUB_REPOSITORY#*/}):$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.0
with:
install: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ${{env.REGISTRY}}
username: ${{env.REPO_OWNER}}
password: ${{secrets.CR_PAT}}
- name: Build and push
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./Dockerfile
push: true
tags: ${{env.REGISTRY}}/${{env.REPO_OWNER}}/${{env.DOCKER_TAG}}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Execute tests
run: docker run -t --entrypoint="npm" ${REGISTRY}/${REPO_OWNER}/${DOCKER_TAG} run test

0 comments on commit 7a33c07

Please sign in to comment.