Skip to content

chore(deps): update actions/checkout action to v6 #43

chore(deps): update actions/checkout action to v6

chore(deps): update actions/checkout action to v6 #43

Workflow file for this run

name: Build
on:
pull_request:
merge_group:
push:
branches:
- develop
tags:
- '*'
jobs:
Container:
name: Build Container Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Write version vars
id: version-vars
run: |
BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
BRANCH=${GITHUB_REF_NAME#v}
APP_VERSION=$(cat config.json | jq -r ".version")
echo Version: $APP_VERSION
echo "VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
- name: Install a SQL Server suite of tools
uses: potatoqualitee/[email protected]
with:
install: sqlengine, sqlpackage
sa-password: Passw0rd
- name: Build Container Image
id: build-image
uses: docker/build-push-action@v6
with:
push: false
tags: |
cloudtooling/dbup-cli:next
cloudtooling/dbup-cli:${{github.run_id }}
cloudtooling/dbup-cli:${{env.APP_VERSION}}_rc
build-args: |
BUILD_DATE=${{env.BUILD_DATE}}
APP_VERSION=${{env.APP_VERSION}}
- name: Run tests in container
id: run-tests
run: |
connectionString="Data Source = localhost; User ID = sa; Password = Passw0rd; Max Pool Size = 1000"
docker run --network=host -e CONNSTR="$connectionString" -v $(pwd)/test:/src cloudtooling/dbup-cli:${{github.run_id }} upgrade
- name: Log in to DockerHub container registry
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USER}}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
if: github.ref == 'refs/heads/develop'
- name: Deploy Container Image
id: push-to-dockerhub-release
run: |
docker push cloudtooling/dbup-cli:next
docker push cloudtooling/dbup-cli:${{env.APP_VERSION}}_rc
if: github.ref == 'refs/heads/develop'
Build-results:
name: Build results
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- Container
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}