Feature: Bump ubuntu
base image to focal-20231003
(#55)
#31
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: ci-master-pr | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
BASE_IMAGE_NAME: [ubuntu] | |
BASE_IMAGE_TAG: [focal-20231003] | |
BUILD_IMAGE_VARIANT: [git, minimal] | |
include: | |
- BASE_IMAGE_TAG: focal-20231003 | |
BUILD_IMAGE_VARIANT: git | |
TAG_LATEST: true | |
env: | |
BASE_REGISTRY_NAMESPACE: library | |
BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} | |
BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} | |
BUILD_REGISTRY_NAMESPACE: startersclan | |
BUILD_IMAGE_NAME: steamcmd | |
BUILD_IMAGE_VARIANT: ${{ matrix.BUILD_IMAGE_VARIANT }} | |
TAG_LATEST: ${{ matrix.TAG_LATEST }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build, test, push image | |
run: | | |
export RELEASE_TAG_REF=$( echo "$GITHUB_REF" | sed -rn 's/^refs\/tags\/(.*)/\1/p' ) | |
./build.sh | |
env: | |
DOCKERHUB_REGISTRY_USER: ${{ vars.DOCKERHUB_REGISTRY_USER }} | |
DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} | |
update-draft-release: | |
needs: linux | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: release-drafter.yml | |
publish: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-draft-release: | |
needs: linux | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: release-drafter.yml | |
publish: true | |
name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' | |
tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
dockerhub-description: | |
needs: linux | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ vars.DOCKERHUB_REGISTRY_USER }} | |
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} | |
repository: ${{ vars.DOCKERHUB_REGISTRY_USER }}/steamcmd | |
short-description: ${{ github.event.repository.description }} | |
readme-filepath: README.md |