Skip to content

Bump swedbank-pay-design-guide-jekyll-theme from 2.1.11 to 2.1.15 in /tests/full #1694

Bump swedbank-pay-design-guide-jekyll-theme from 2.1.11 to 2.1.15 in /tests/full

Bump swedbank-pay-design-guide-jekyll-theme from 2.1.11 to 2.1.15 in /tests/full #1694

Workflow file for this run

name: Publish
on:
push:
branches: [main]
tags: ["*"]
pull_request:
branches: [main]
pull_request_target:
branches: [main]
jobs:
variables:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.variables.outputs.ref }}
sha: ${{ steps.variables.outputs.sha }}
sha8: ${{ steps.variables.outputs.sha8 }}
date: ${{ steps.variables.outputs.date }}
version: ${{ steps.variables.outputs.version }}
docker_image_name: ${{ steps.variables.outputs.docker_image_name }}
docker_image_tag: ${{ steps.variables.outputs.docker_image_tag }}
docker_image_fqn: ${{ steps.variables.outputs.docker_image_fqn }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: "5.x.x"
- id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
- name: Generate variables
id: variables
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: ./.github/scripts/variables.sh ${{ steps.gitversion.outputs.fullSemVer }}
docker-publish:
runs-on: ubuntu-latest
needs: variables
if: |
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request_target' }}
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Publish unstable Docker image to GitHub Package Registry
if: startsWith(github.ref, 'refs/tags/') != true
uses: whoan/docker-build-with-cache-action@v8.0.0
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
image_name: jekyll-plantuml
image_tag: ${{ needs.variables.outputs.docker_image_tag }}
dockerfile: .docker/Dockerfile
push_image_and_stages: ./.github/scripts/docker_run_test.sh build --image ${{ needs.variables.outputs.docker_image_fqn }} --image-tag ${{ needs.variables.outputs.docker_image_tag }} --repository ${{ github.repository }} --dir ${{ github.workspace }}/tests/minimal --token ${{ secrets.GITHUB_TOKEN }} --verbose --no-pull
pull_image_and_stages: false
build_extra_args: --build-arg TAG="${{ needs.variables.outputs.docker_image_tag }}" --build-arg SHA="${{ needs.variables.outputs.sha }}" --build-arg DATE="${{ needs.variables.outputs.date }}" --build-arg VERSION="${{ needs.variables.outputs.version }}"
- name: Publish stable Docker image to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
uses: whoan/docker-build-with-cache-action@v8.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
image_name: swedbankpay/jekyll-plantuml
image_tag: ${{ needs.variables.outputs.docker_image_tag }}
dockerfile: .docker/Dockerfile
push_image_and_stages: ./.github/scripts/docker_run_test.sh build --image ${{ needs.variables.outputs.docker_image_fqn }} --image-tag ${{ needs.variables.outputs.docker_image_tag }} --repository ${{ github.repository }} --dir ${{ github.workspace }}/tests/minimal --token ${{ secrets.GITHUB_TOKEN }} --verbose --no-pull
pull_image_and_stages: false
build_extra_args: --build-arg TAG="${{ needs.variables.outputs.docker_image_tag }}" --build-arg SHA="${{ needs.variables.outputs.sha }}" --build-arg DATE="${{ needs.variables.outputs.date }}" --build-arg VERSION="${{ needs.variables.outputs.version }}"
docker-verify:
runs-on: ubuntu-latest
needs: [docker-publish, variables]
steps:
- uses: actions/checkout@v4
- name: Download and Run Image
run: |
./.github/scripts/docker_run_test.sh build \
--image ${{ needs.variables.outputs.docker_image_fqn }} \
--repository ${{ github.repository }} \
--dir ${{ github.workspace }}/tests/minimal \
--token ${{ secrets.GITHUB_TOKEN }} \
--image-tag ${{ needs.variables.outputs.docker_image_tag }} \
--verbose
- name: Deploy to GitHub Pages
run: |
./.github/scripts/deploy.sh \
--repository ${{ github.repository }} \
--ref ${{ github.ref }} \
--token ${{ secrets.GITHUB_TOKEN }} \
--image ${{ needs.variables.outputs.docker_image_fqn }} \
--verbose