Bump golang.org/x/crypto from 0.45.0 to 0.47.0 #122
Workflow file for this run
This file contains hidden or 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: Docker Image | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - 'v*' | ||
| paths: | ||
| - Dockerfile | ||
| - '**.go' | ||
| - 'go.mod' | ||
| - 'go.sum' | ||
| - '.github/workflows/docker.yml' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - Dockerfile | ||
| - '**.go' | ||
| - 'go.mod' | ||
| - 'go.sum' | ||
| workflow_dispatch: | ||
| env: | ||
| IMAGE_NAME: mdeous/plasmid | ||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: read | ||
| contents: read | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | ||
| - name: Log into GitHub container registry | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: mdeous | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Get plasmid version | ||
| id: get_version | ||
| run: | | ||
| version="" | ||
| if [ "${GITHUB_REF}" == "refs/heads/main" ]; then | ||
| version="nightly" | ||
| else | ||
| version="$(make version)" | ||
| fi | ||
| echo "Version: ${version}" | ||
| echo "version=${version}" >> $GITHUB_OUTPUT | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| with: | ||
| install: true | ||
| - name: Pull latest image | ||
| run: docker pull ghcr.io/${IMAGE_NAME}:latest | ||
| continue-on-error: true | ||
| - name: Build image | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 | ||
| with: | ||
| pull: true | ||
| push: false | ||
| cache-from: ghcr.io/${{ env.IMAGE_NAME }}:latest | ||
| tags: ${{ env.IMAGE_NAME }}:ci | ||
| outputs: type=docker,dest=/tmp/image.tar | ||
| build-args: "VERSION=${{ steps.get_version.outputs.version }}" | ||
| - name: Upload image archive | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4 | ||
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | ||
| with: | ||
| name: plasmid-image | ||
| path: /tmp/image.tar | ||
| publish: | ||
| name: Publish | ||
| needs: build | ||
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| packages: write | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| registry: | ||
| - ghcr.io | ||
| - docker.io | ||
| include: | ||
| - registry: ghcr.io | ||
| secret: GITHUB_TOKEN | ||
| - registry: docker.io | ||
| secret: DOCKER_TOKEN | ||
| steps: | ||
| - name: Download image archive | ||
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v4 | ||
| with: | ||
| name: plasmid-image | ||
| path: /tmp/ | ||
| - name: Import image | ||
| run: docker load --input /tmp/image.tar | ||
| - name: Log into Docker registry | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | ||
| with: | ||
| registry: ${{ matrix.registry }} | ||
| username: mdeous | ||
| password: ${{ secrets[matrix.secret] }} | ||
| - name: Get image version | ||
| id: get_version | ||
| run: | | ||
| version="" | ||
| if [ "${GITHUB_REF}" == "refs/heads/main" ]; then | ||
| version="latest" | ||
| else | ||
| version="${GITHUB_REF##*/}" | ||
| fi | ||
| echo "Image version: ${version}" | ||
| echo "version=${version}" >> $GITHUB_OUTPUT | ||
| - name: Tag image | ||
| run: docker tag ${IMAGE_NAME}:ci ${{ matrix.registry }}/${IMAGE_NAME}:${IMAGE_VERSION} | ||
| env: | ||
| IMAGE_VERSION: ${{ steps.get_version.outputs.version }} | ||
| - name: Tag latest image | ||
| if: ${{ steps.get_version.outputs.version }} != 'latest' | ||
|
Check warning on line 142 in .github/workflows/docker.yml
|
||
| run: docker tag ${IMAGE_NAME}:ci ${{ matrix.registry }}/${IMAGE_NAME}:latest | ||
| - name: Push image to container registry | ||
| run: docker push ${{ matrix.registry }}/${IMAGE_NAME}:${IMAGE_VERSION} | ||
| env: | ||
| IMAGE_VERSION: ${{ steps.get_version.outputs.version }} | ||
| - name: Push latest image to container registry | ||
| if: ${{ steps.get_version.outputs.version }} != 'latest' | ||
|
Check warning on line 151 in .github/workflows/docker.yml
|
||
| run: docker push ${{ matrix.registry }}/${IMAGE_NAME}:latest | ||