Update dependencies, fix CI to enable auto-updates #317
Workflow file for this run
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: Continuous Integration | |
on: | |
push: | |
branches: [master] | |
tags: ["v*"] | |
pull_request: | |
branches: [master] | |
pull_request_target: | |
branches: [master] | |
jobs: | |
test: | |
name: All checks are passed | |
uses: ./.github/workflows/test.yaml | |
secrets: inherit | |
approve: | |
name: Approve bot PR | |
runs-on: ubuntu-latest | |
if: endsWith(github.actor, '[bot]') | |
needs: test | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable auto-merge for bot PRs | |
run: gh pr merge --auto --squash --delete-branch "$PR_URL" | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Release web-shell image | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
env: | |
IMAGE_NAME: ghcr.io/neuro-inc/web-shell | |
steps: | |
- name: Checkout commit | |
uses: actions/checkout@v4 | |
- name: Login to ghcr.io | |
uses: docker/#-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
run: | | |
docker build -t $IMAGE_NAME . | |
- name: Push image | |
run: | | |
set -x | |
for tag in $(echo "latest,pipelines,${GITHUB_REF#refs/tags/}" | tr "," " ") | |
do | |
docker tag $IMAGE_NAME $IMAGE_NAME:$tag && docker push $IMAGE_NAME:$tag | |
done |