From 3fd78559507dbd7f313286af4aa3ac8756105a6b Mon Sep 17 00:00:00 2001 From: Russ Garrett Date: Sat, 9 Mar 2024 11:55:09 +0000 Subject: [PATCH] Add build action --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ README.md | 7 ++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5a77ccb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build Container + +on: + push: + branches: + - main + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Generate metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/README.md b/README.md index e8c5713..ac24809 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,13 @@ you've downloaded the config file, put it in `./data/config`, and add the follow enableSemantics( 'localhost:8087' ); +### Deployment + +Push a tag for the version of mediawiki you're publishing, e.g. for mediawiki 1.39.6, the tag should be +`v1.39.6-1`. + +Published to ghcr.io/emfcamp/docker-mediawiki. + ## Updating If a mediawiki DB needs an upgrade: