build(deps): bump github.com/prometheus/client_golang (#292) #319
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Docker Package" | |
on: | |
push: | |
# Publish `master` as Docker `latest` image. | |
branches: | |
- master | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
env: | |
# TODO: Change variable to your image's name. | |
IMAGE_NAME: sdns | |
jobs: | |
# Push image to GitHub Packages. | |
# See also https://docs.docker.com/docker-hub/builds/ | |
push: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Version | |
id: get_version | |
run: | | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo ::set-output name=VERSION::$VERSION | |
- name: Build image | |
run: docker build -t docker.pkg.github.com/${{ github.repository }}/sdns:${{ steps.get_version.outputs.VERSION }} . | |
- name: Log into registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | |
- name: Push image | |
run: docker push docker.pkg.github.com/${{ github.repository }}/sdns:${{ steps.get_version.outputs.VERSION }} |