Simplify CI
Some checks failed
Build Docker image and publish / docker (push) Failing after 1m4s

This commit is contained in:
Ethanell 2024-02-16 23:05:53 +01:00
parent a9b12afe85
commit efafef7dbd

View file

@ -24,19 +24,26 @@ jobs:
id: env id: env
run: | run: |
echo "DOCKER_TAG=$DOCKER_REPOSITORY/$(echo "$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]'):latest" >> "$GITHUB_ENV" echo "DOCKER_TAG=$DOCKER_REPOSITORY/$(echo "$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]'):latest" >> "$GITHUB_ENV"
apk add --no-cache git nodejs apk add --no-cache git nodejs zstd
- name: "Login to Docker repository" - name: "Login to Docker repository"
id: login uses: https://github.com/docker/login-action@v3
run: docker login -u "$GITHUB_ACTOR" -p "${{ secrets.PACKAGE_TOKEN }}" "$DOCKER_REPOSITORY" with:
registry: "${{ env.DOCKER_REPOSITORY }}"
username: "${{ env.GITHUB_ACTOR }}"
password: "${{ secrets.PACKAGE_TOKEN }}"
- name: "Get repo" - name: "Cache Docker image"
uses: https://code.forgejo.org/actions/checkout@v4 uses: https://code.forgejo.org/actions/cache@v3
with:
path: "${{ env.GITHUB_WORKSPACE }}/.docker_cache"
key: "docker"
- name: "Build Docker image" - name: "Build and push"
id: build uses: https://github.com/docker/build-push-action@v5
run: docker buildx build --pull --platform linux/amd64 -t "$DOCKER_TAG" . with:
context: .
- name: "Publish Docker image" push: true
id: push tags: "${{ env.DOCKER_TAG }}"
run: docker push "$DOCKER_TAG" cache-from: "type=local,dest=${{ env.GITHUB_WORKSPACE }}/.docker_cache"
cache-to: "type=local,dest=${{ env.GITHUB_WORKSPACE }}/.docker_cache"