Skip to content

Commit

Permalink
Merge pull request #223 from seatsurfing/version-1.16.0
Browse files Browse the repository at this point in the history
Added support for ghcr.io
  • Loading branch information
virtualzone committed Jan 27, 2024
2 parents 280fd11 + 99e2479 commit eca86ff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
46 changes: 31 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,87 @@ on:
workflow_dispatch:
branches: [ master ]

env:
REGISTRY: ghcr.io

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set version env
run: echo "CI_VERSION=$(cat server/res/version.txt | awk NF)" >> $GITHUB_ENV
- name: Set date env
run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Prepare Docker Hub Readme
run: cat docker-readme.md | sed "s/{{version}}/${CI_VERSION}/g" | sed "s/{{date}}/${TODAY}/g" > docker-readme-modified.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log into registry
- name: Log into docker.io registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: seatsurfing
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Log into ghcr.io registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
build-args: CI_VERSION=${{ env.CI_VERSION }}
context: ./booking-ui
platforms: linux/amd64,linux/arm64
push: true
tags: |
seatsurfing/booking-ui:${{ env.CI_VERSION }}
seatsurfing/booking-ui:latest
${{ env.REGISTRY }}/seatsurfing/booking-ui:${{ env.CI_VERSION }}
${{ env.REGISTRY }}/seatsurfing/booking-ui:latest
docker.io/seatsurfing/booking-ui:${{ env.CI_VERSION }}
docker.io/seatsurfing/booking-ui:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
build-args: CI_VERSION=${{ env.CI_VERSION }}
context: ./admin-ui
platforms: linux/amd64,linux/arm64
push: true
tags: |
seatsurfing/admin-ui:${{ env.CI_VERSION }}
seatsurfing/admin-ui:latest
${{ env.REGISTRY }}/seatsurfing/admin-ui:${{ env.CI_VERSION }}
${{ env.REGISTRY }}/seatsurfing/admin-ui:latest
docker.io/seatsurfing/admin-ui:${{ env.CI_VERSION }}
docker.io/seatsurfing/admin-ui:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
seatsurfing/backend:${{ env.CI_VERSION }}
seatsurfing/backend:latest
${{ env.REGISTRY }}/seatsurfing/backend:${{ env.CI_VERSION }}
${{ env.REGISTRY }}/seatsurfing/backend:latest
docker.io/seatsurfing/backend:${{ env.CI_VERSION }}
docker.io/seatsurfing/backend:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Docker Hub Description
Expand Down
2 changes: 1 addition & 1 deletion server/res/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.0
1.16.0

0 comments on commit eca86ff

Please sign in to comment.