docker-static/.github/workflows/trial.yml

75 lines
1.9 KiB
YAML
Raw Normal View History

2022-11-01 20:29:02 +01:00
name: trial
on:
workflow_dispatch:
push:
2022-11-01 22:01:36 +01:00
# schedule:
# - cron: 0 3 * * 1
2022-11-01 20:29:02 +01:00
# push:
# tags:
# - "v*.*.*"
jobs:
2022-11-01 20:44:58 +01:00
tags:
runs-on: ubuntu-latest
2022-11-01 20:54:39 +01:00
outputs:
matrix: ${{ steps.fetcher.outputs.matrix }}
2022-11-01 21:07:58 +01:00
defaults:
run:
working-directory: tags
2022-11-01 20:44:58 +01:00
steps:
2022-11-01 20:46:05 +01:00
- uses: actions/checkout@v3
2022-11-01 20:44:58 +01:00
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i
2022-11-01 20:54:39 +01:00
- id: fetcher
2022-11-01 21:07:58 +01:00
run: node .
2022-11-01 20:44:58 +01:00
2022-11-01 20:29:02 +01:00
build:
2022-11-01 20:47:56 +01:00
runs-on: ubuntu-latest
needs: tags
2022-11-01 20:29:02 +01:00
strategy:
2022-11-01 20:52:37 +01:00
matrix: ${{fromJson(needs.tags.outputs.matrix)}}
2022-11-01 20:29:02 +01:00
steps:
2022-11-01 20:46:05 +01:00
- uses: actions/checkout@v3
2022-11-01 20:29:02 +01:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
2022-11-01 21:39:50 +01:00
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Labels
id: meta
uses: docker/metadata-action@v4
with:
images: |
2022-11-01 21:52:58 +01:00
cupcakearmy/static
2022-11-01 21:39:50 +01:00
ghcr.io/${{ github.repository }}
tags: ${{ matrix.tags }}
2022-11-01 22:01:36 +01:00
sep-tags: ","
2022-11-01 21:39:50 +01:00
2022-11-01 20:29:02 +01:00
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
2022-11-01 21:39:50 +01:00
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
2022-11-01 20:29:02 +01:00
push: false
build-args: NGINX=${{ matrix.version }}
2022-11-01 21:39:50 +01:00
tags: ${{ steps.meta.outputs.tags }}
# tags: cupcakearmy/static:${{ matrix.tag }},ghcr.io/${{ github.repository }}:${{ matrix.tag }}