Skip to content

build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 (#283) #320

build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 (#283)

build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 (#283) #320

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 }}