feat(#241): warn about limited availabilities #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and publish Docker image | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release/ef-2024' | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-and-push-image: | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@eurofurence' | |
- run: npm install | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: npm run build -- --no-uglify | |
shell: bash | |
env: | |
PATH_PREFIX: '/aN3nNFwFoi5QkyPaVJ54dDTDc6HrrCYGAL6U6GUuyV2uvvekgOxqYe6K2hur/app' | |
GATSBY_API_BASE_URL: '/aN3nNFwFoi5QkyPaVJ54dDTDc6HrrCYGAL6U6GUuyV2uvvekgOxqYe6K2hur' | |
PREFIX_PATHS: 'true' | |
- name: Log in to the Container registry | |
run: 'echo "$REGISTRY_PASS" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin' | |
shell: bash | |
env: | |
REGISTRY: 'ghcr.io' | |
REGISTRY_USER: ${{ github.actor }} | |
REGISTRY_PASS: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker build and push 'latest-ef' image | |
if: startsWith(github.ref, 'refs/heads/') | |
run: > | |
TAG_ARGS=$(echo -n "$IMAGE_TAGS" | sed -r "s_([^ :/]+)_ --tag $REGISTRY/$IMAGE_NAME:\1 _g") && | |
docker build | |
--label org.opencontainers.image.url="$FULL_REPO_URL" | |
--label org.opencontainers.image.revision="$COMMIT_HASH" | |
$TAG_ARGS | |
--pull | |
. && | |
docker push -a "$REGISTRY/$IMAGE_NAME" | |
shell: bash | |
env: | |
REGISTRY: 'ghcr.io' | |
IMAGE_NAME: ${{ github.repository }} | |
IMAGE_TAGS: latest-ef | |
FULL_REPO_URL: "https://github.com/${{ github.repository }}" | |
COMMIT_HASH: ${{ github.sha }} | |
- name: Docker release build and push (v0.1) | |
if: startsWith(github.ref, 'refs/tags/v0.1.') | |
run: > | |
docker build | |
--label org.opencontainers.image.url="$FULL_REPO_URL" | |
--label org.opencontainers.image.revision="$COMMIT_HASH" | |
--label org.opencontainers.image.version="$IMAGE_TAG" | |
--tag $REGISTRY/$IMAGE_NAME:$IMAGE_TAG | |
--tag $REGISTRY/$IMAGE_NAME:v0.1 | |
--pull | |
. && | |
docker push -a "$REGISTRY/$IMAGE_NAME" | |
shell: bash | |
env: | |
REGISTRY: 'ghcr.io' | |
IMAGE_NAME: ${{ github.repository }} | |
IMAGE_TAG: ${{ github.ref_name }} | |
FULL_REPO_URL: "https://github.com/${{ github.repository }}" | |
COMMIT_HASH: ${{ github.sha }} |