Skip to content

Update README

Update README #16

Workflow file for this run

name: Build new tag
on:
push:
tags:
- '[1-9]+.[0-9]+.[0-9]+-[0-9]+-v*'
jobs:
build:
if: github.event.base_ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get current version
id: current_version
run: |
echo ::set-output name=MTA_SERVER_VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '-' -f 1)
echo ::set-output name=MTA_SERVER_BUILD_NUMBER::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '-' -f 2)
echo ::set-output name=IMAGE_VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '-' -f 3 | cut -d v -f 2)
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
push: true
build-args: |
MTA_SERVER_VERSION=${{ steps.current_version.outputs.MTA_SERVER_VERSION }}
MTA_SERVER_BUILD_NUMBER=${{ steps.current_version.outputs.MTA_SERVER_BUILD_NUMBER }}
tags: |
notfound/mtasa-server:latest
notfound/mtasa-server:${{ steps.current_version.outputs.MTA_SERVER_VERSION }}-${{ steps.current_version.outputs.MTA_SERVER_BUILD_NUMBER }}-v${{ steps.current_version.outputs.IMAGE_VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache