Merge pull request #137 from ironpeakservices/dependabot/docker/alpin… #60
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
on: | |
push: | |
branches: [master] | |
jobs: | |
dockerpush: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set env | |
id: release | |
run: echo ::set-output name=RELEASE_VERSION::$(git describe --match "[0-9]*.[0-9]*.[0-9]*" --tags $(git rev-list --tags --max-count=1)) | |
- | |
id: vars | |
run: | | |
echo ::set-output name=alpine_version::$(grep '^FROM alpine' Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) | |
- | |
name: Publish to Registry | |
uses: elgohr/Publish-Docker-Github-Action@v4 | |
with: | |
registry: ghcr.io | |
name: "ghcr.io/ironpeakservices/iron-alpine/iron-alpine:${{ steps.vars.outputs.alpine_version }}" | |
username: hazcod | |
password: ${{ secrets.PACKAGE_TOKEN }} | |
tag_semver: true | |
- | |
name: Create GitHub release | |
uses: actions/[email protected] | |
if: steps.vars.outputs.alpine_version != steps.release.outputs.RELEASE_VERSION | |
with: | |
tag_name: ${{ steps.vars.outputs.alpine_version }} | |
release_name: iron-alpine | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }} |