diff --git a/.dockerignore b/.dockerignore index 55c08c0..f9c3d7b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,7 @@ # Ignore git .git .gitignore +.github # Ignore IDE config files .idea/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 383833c..345d5a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,9 +3,12 @@ name: Build / Test / Push on: push: branches: - - '*' + - '**' workflow_dispatch: +env: + DOCKER_METADATA_SET_OUTPUT_ENV: 'true' + jobs: build: runs-on: ubuntu-latest @@ -78,6 +81,8 @@ jobs: needs: - build - test + env: + DOCKER_APP_IMAGE: ${{ needs.build.outputs.build-image }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -100,9 +105,7 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} - name: Retag and push the image - uses: docker/build-push-action@v6 - with: - cache-from: type=registry,ref=${{ needs.build.outputs.build-image }} - labels: ${{ steps.branch-meta.outputs.labels }} - push: true - tags: ${{ steps.branch-meta.outputs.tags }} + run: | + docker pull "$DOCKER_APP_IMAGE" + echo "$DOCKER_METADATA_OUTPUT_TAGS" | tr ' ' '\n' | xargs -n1 docker tag "$DOCKER_APP_IMAGE" + docker push --all-tags "$(echo "$DOCKER_APP_IMAGE" | cut -f1 -d:)" diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index c4650d1..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,6 +0,0 @@ -dockerComposePipeline( - commands: [exec: 'test/test.sh'], - artifacts: [ - raw: 'artifacts/**/*.jpg' - ] -)