-
Notifications
You must be signed in to change notification settings - Fork 100
48 lines (42 loc) · 1.36 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Build and deploy"
on:
push:
branches:
- source
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle install
- run: bundle exec middleman build
- id: variables
run: |
[[ ! -f .ruby-version ]] && exit 1
RUBY_VERSION="$(< .ruby-version)"
echo "::set-output name=RUBY_VERSION::${RUBY_VERSION}"
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
with:
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/flatpak/flatpak.github.io:${{ github.sha }}
ghcr.io/flatpak/flatpak.github.io:latest
build-args: |
RUBY_VERSION=${{ steps.variables.outputs.RUBY_VERSION }}
labels: |
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=ssh://[email protected]:${{ github.repository }}.git
org.opencontainers.image.url=https://github.com/${{ github.repository }}
cache-from: type=gha
cache-to: type=gha,mode=max