Skip to content

Bump docker/build-push-action from 5 to 6 #3095

Bump docker/build-push-action from 5 to 6

Bump docker/build-push-action from 5 to 6 #3095

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: textbook/take-action@nodejs
id: nodejs
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run e2e
- uses: docker/setup-buildx-action@v3
with:
install: true
- uses: docker/build-push-action@v6
with:
build-args: |
NODE_RELEASE=${{ steps.nodejs.outputs.node-version }}
load: true
push: false
tags: textbook/impasse
- run: npm run e2e:docker
deploy-docker:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: build
steps:
- uses: textbook/take-action@nodejs
id: nodejs
- name: Get full tag
id: full_tag
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Get major version
id: versions
run: |
echo "MAJOR=$(echo $VERSION | cut -d. -f1)" >> $GITHUB_OUTPUT
echo "MINOR=$(echo $VERSION | cut -d. -f2)" >> $GITHUB_OUTPUT
env:
VERSION: ${{ steps.full_tag.outputs.VERSION }}
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/build-push-action@v6
with:
build-args: |
NODE_RELEASE=${{ steps.nodejs.outputs.node-version }}
push: true
tags: |
textbook/impasse
textbook/impasse:${{ steps.full_tag.outputs.VERSION }}
textbook/impasse:${{ steps.versions.outputs.MAJOR }}
textbook/impasse:${{ steps.versions.outputs.MAJOR }}.${{ steps.versions.outputs.MINOR }}
- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: textbook/impasse
deploy-heroku:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: build
steps:
- uses: actions/checkout@v4
- uses: akhileshns/heroku-deploy@v3.13.15
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: impasse
heroku_email: ${{ secrets.HEROKU_EMAIL }}