Skip to content

docker-build

docker-build #133

Workflow file for this run

name: docker-build
on:
schedule:
- cron: "0 10 * * *"
push:
branches-ignore:
- main
tags:
- "v*.*.*"
pull_request:
jobs:
docker:
uses: geokrety/geokrety-gha-workflows/.github/workflows/docker-build.yml@main
with:
image_name: geokrety/website-base
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
dockerfile: Dockerfile
secrets:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
update-version-set:
uses: geokrety/geokrety-gha-workflows/.github/workflows/version-set.yml@main
needs: docker
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
update-website-base:
if: "startsWith(github.ref, 'refs/tags/v')"
runs-on: ubuntu-latest
needs: docker
steps:
- name: Checkout website repository
uses: actions/checkout@v3
with:
repository: geokrety/geokrety-website
ref: main
- name: Get values
id: vars
run: |
echo "version=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_OUTPUT
- name: Bump base tag in Dockerfile
run: |
sed -i 's/^ARG BASE_TAG=.*$/ARG BASE_TAG=${{ steps.vars.outputs.version }}/' Dockerfile
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN }}
add-paths: Dockerfile
commit-message: |
feat: Bump geokrety/website-base base image to ${{ steps.vars.outputs.version }}
committer: geokrety-bot <[email protected]>
author: geokrety-bot <[email protected]>
branch: deployment/docker-tag/${{ steps.vars.outputs.version }}
delete-branch: true
title: |
Bump geokrety/website-base tag to ${{ steps.vars.outputs.version }}
labels: version-set
assignees: kumy
reviewers: kumy
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
shell: bash
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"