Skip to content

Push to github container registry #22

Push to github container registry

Push to github container registry #22

Workflow file for this run

name: Go
on:
push:
branches:
- master
jobs:
build:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1
id: go
- name: Build
run: |
make docker
- name: release
env:
X: Y
env:
# I couldn't get the releases to work with the GITHUB_TOKEN so made secrets... :(
# GH_DEPLOY_USER: ${{ secrets.GH_DEPLOY_USER }}
# GH_DEPLOY_KEY: ${{ secrets.GH_DEPLOY_KEY }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
IMAGE: treeder/bump
run: |
git fetch --tags
git tag
git config --global user.email "treeder+github@gmail.com"
git config --global user.name "Github Action"
wget -O - https://raw.githubusercontent.com/treeder/bump/master/gitbump.sh | bash
version=$(git tag --sort=-refname --list "v[0-9]*" | head -n 1)
echo "new version $version"
# docker it
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker tag $IMAGE:latest $IMAGE:$version
docker push $IMAGE:latest
docker push $IMAGE:$version
docker push ghcr.io/treeder/bump:latest
docker push ghcr.io/treeder/bump:$version