diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d4eae66..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Build and push images - -on: - push: - branches: - - master - schedule: - # every 1st day of every month - # see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule - - cron: '0 0 1 * *' - -env: - DOCKER_REGISTRY: magicxor - DOCKER_IMAGE: tor-simple - -jobs: - ubuntu_lts_repo: - name: TOR from Ubuntu LTS repo - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - id: get_build_info - run: | - docker build . --file=ubuntu_lts_repo/VersionInfo.Dockerfile --progress=plain --no-cache -t tor-version-info - package_versions=$(docker run --rm tor-version-info) - echo "PACKAGE_VERSIONS=$package_versions" >> $GITHUB_OUTPUT - echo "BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT - - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - # https://github.com/docker/build-push-action - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - context: ubuntu_lts_repo/. - no-cache: true - tags: | - ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:latest - ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} - platforms: | - linux/amd64 - linux/arm/v7 - linux/arm64/v8 - build-args: | - VERSION=${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} - VCS_REF=${{ github.sha }} - BUILD_DATE=${{ steps.get_build_info.outputs.BUILD_DATE }} - BUILD_PLATFORM=${{ runner.os }}/${{ runner.arch }} - - ubuntu_rolling_sources: - name: TOR from sources - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - id: get_build_info - run: | - docker build . --file=ubuntu_rolling_sources/VersionInfo.Dockerfile --progress=plain --no-cache -t tor-version-info - package_versions=$(docker run --rm tor-version-info) - echo "PACKAGE_VERSIONS=$package_versions" >> $GITHUB_OUTPUT - echo "BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT - - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - # https://github.com/docker/build-push-action - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - context: ubuntu_rolling_sources/. - no-cache: true - tags: | - ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} - platforms: | - linux/amd64 - linux/arm/v7 - linux/arm64/v8 - build-args: | - VERSION=${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} - VCS_REF=${{ github.sha }} - BUILD_DATE=${{ steps.get_build_info.outputs.BUILD_DATE }} - BUILD_PLATFORM=${{ runner.os }}/${{ runner.arch }} diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index 56131a8..4941292 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -9,14 +9,13 @@ on: # see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule - cron: '0 0 1 * *' - env: DOCKER_REGISTRY: magicxor DOCKER_IMAGE: tor-simple jobs: ubuntu_lts_repo: - name: Ubuntu LTS repo tor version + name: tor from Ubuntu LTS repo runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -60,3 +59,48 @@ jobs: VCS_REF=${{ github.sha }} BUILD_DATE=${{ steps.get_build_info.outputs.BUILD_DATE }} BUILD_PLATFORM=${{ runner.os }}/${{ runner.arch }} + + ubuntu_rolling_sources: + name: tor from sources + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - id: get_build_info + run: | + docker build . --file=ubuntu_rolling_sources/VersionInfo.Dockerfile --progress=plain --no-cache -t tor-version-info + package_versions=$(docker run --rm tor-version-info) + echo "PACKAGE_VERSIONS=$package_versions" >> $GITHUB_OUTPUT + echo "BUILD_DATE=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT + + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # https://github.com/docker/build-push-action + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + context: ubuntu_rolling_sources/. + no-cache: true + tags: | + ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} + platforms: | + linux/amd64 + linux/arm/v7 + linux/arm64/v8 + build-args: | + VERSION=${{ steps.get_build_info.outputs.PACKAGE_VERSIONS }} + VCS_REF=${{ github.sha }} + BUILD_DATE=${{ steps.get_build_info.outputs.BUILD_DATE }} + BUILD_PLATFORM=${{ runner.os }}/${{ runner.arch }}