Skip to content

Docker Build

Docker Build #768

Workflow file for this run

name: Docker Build
on:
push:
branches:
- "master"
paths-ignore:
- "**.md"
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
docker:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch Version
run: |-
echo "VERSION=$(sh ./scripts/version.sh)" >> $GITHUB_ENV
- run: sh ./scripts/version.sh
- name: Build & Push
uses: docker/build-push-action@v2
with:
push: true
no-cache: false
tags: |
ghcr.io/zekrotja/factorio:latest
ghcr.io/zekrotja/factorio:${{ env.VERSION }}
print_current_version:
name: "Print Current Version"
runs-on: ubuntu-latest
needs:
- docker
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Echo Version
run: |-
echo $(bash scripts/version.sh) > current_version.txt
- name: Commit & Push
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: update current version
branch: master