Skip to content

build(deps-dev): bump follow-redirects from 1.15.2 to 1.15.4 (#36) #25

build(deps-dev): bump follow-redirects from 1.15.2 to 1.15.4 (#36)

build(deps-dev): bump follow-redirects from 1.15.2 to 1.15.4 (#36) #25

name: "Build and push docker image"
# run this workflow when a new commit in the "main" branch or release/tag is pushed
on:
push:
branches:
- 'main'
tags:
- '*'
# allow this workflow to be manually triggered from the actions tab (for debugging)
workflow_dispatch:
# allow job to read repository and write image/package to ghcr.io
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# check out repository
- uses: actions/checkout@v4
# log in with github token credentials
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# pull metadata from Github events (so we can use release version number)
- name: Pull metadata from Github
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
# build image, tagging with the release tag and latest on a release,
# or with "main" if built against main (commit push) or built using workflow_dispatch
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}