forked from amacneil/dbmate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Comment push and dependabot steps
- Loading branch information
Showing
2 changed files
with
93 additions
and
109 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,96 +137,96 @@ jobs: | |
- name: Run make test | ||
run: docker compose run --rm dev make test | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Generate Docker image tags | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
with: | ||
images: | | ||
${{ github.repository }} | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=ref,event=branch | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
- name: Publish Docker image | ||
uses: docker/build-push-action@v6 | ||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
with: | ||
context: . | ||
target: release | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
npm: | ||
name: NPM | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org | ||
cache: npm | ||
cache-dependency-path: typescript/package-lock.json | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
|
||
- run: find dist | ||
|
||
- run: npm ci | ||
working-directory: typescript | ||
|
||
- run: npm run lint:ci | ||
working-directory: typescript | ||
|
||
- run: npm run generate | ||
working-directory: typescript | ||
|
||
- run: npm run publish | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
working-directory: typescript | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
dependabot: | ||
name: Dependabot | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
steps: | ||
- name: Automatically approve dependabot PRs | ||
uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews | ||
owner: ${{ github.event.repository.owner.login }} | ||
repo: ${{ github.event.repository.name }} | ||
pull_number: ${{ github.event.pull_request.number }} | ||
event: APPROVE | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v3 | ||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# | ||
# - name: Login to GitHub Container Registry | ||
# uses: docker/login-action@v3 | ||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# - name: Generate Docker image tags | ||
# id: meta | ||
# uses: docker/metadata-action@v5 | ||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
# with: | ||
# images: | | ||
# ${{ github.repository }} | ||
# ghcr.io/${{ github.repository }} | ||
# tags: | | ||
# type=ref,event=branch | ||
# type=semver,pattern={{version}} | ||
# type=semver,pattern={{major}}.{{minor}} | ||
# type=semver,pattern={{major}} | ||
# | ||
# - name: Publish Docker image | ||
# uses: docker/build-push-action@v6 | ||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} | ||
# with: | ||
# context: . | ||
# target: release | ||
# platforms: linux/amd64,linux/arm64 | ||
# push: true | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
|
||
# npm: | ||
# name: NPM | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 20 | ||
# registry-url: https://registry.npmjs.org | ||
# cache: npm | ||
# cache-dependency-path: typescript/package-lock.json | ||
# | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# path: dist | ||
# | ||
# - run: find dist | ||
# | ||
# - run: npm ci | ||
# working-directory: typescript | ||
# | ||
# - run: npm run lint:ci | ||
# working-directory: typescript | ||
# | ||
# - run: npm run generate | ||
# working-directory: typescript | ||
# | ||
# - run: npm run publish | ||
# if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
# working-directory: typescript | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
# dependabot: | ||
# name: Dependabot | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# pull-requests: write | ||
# if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
# steps: | ||
# - name: Automatically approve dependabot PRs | ||
# uses: octokit/[email protected] | ||
# with: | ||
# route: POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews | ||
# owner: ${{ github.event.repository.owner.login }} | ||
# repo: ${{ github.event.repository.name }} | ||
# pull_number: ${{ github.event.pull_request.number }} | ||
# event: APPROVE | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.