diff --git a/.github/actions/quay/action.yml b/.github/actions/quay/action.yml deleted file mode 100644 index 377b2ae..0000000 --- a/.github/actions/quay/action.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: 'Run command in Quay image' -description: 'Run a command in a quay.io container' -inputs: - image: - description: 'Image' - required: true - options: - description: 'Options for the container' - required: false - run: - description: 'Args for the container entrypoint' - required: false - entrypoint: - description: 'Container entrypoint to use' - required: false -runs: - using: 'composite' - steps: - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ env.QUAY_USER }} - password: ${{ env.QUAY_PASSWORD }} - - name: Run command - shell: bash - run: | - export ENTRYPOINT='${{ inputs.entrypoint }}' - export COMMAND='${{ inputs.run }}' - export COMMAND_PREFIX='' - - # Prep for a shell script. - if [[ $ENTRYPOINT == '' ]]; then - ENTRYPOINT='sh' - COMMAND_PREFIX='-c' - COMMAND=$(echo "$COMMAND" | sed -r '/^\s*$/d') - COMMAND=${COMMAND//$'\n'/ ; } - fi - - # Strip newlines in options. - export OPTIONS='${{ inputs.options }}' - OPTIONS=${OPTIONS//$'\n'/ } - - # Sanitize the image name. - export IMAGE='${{ inputs.image }}' - IMAGE=${IMAGE//$'\n'/} - - # Prep the workspace. - export WORKSPACE='${{ github.workspace }}' - WORKSPACE=${WORKSPACE//$'\n'/} - - # Prep volumes. - export VOLUMES="-v /var/run/docker.sock:/var/run/docker.sock -v $WORKSPACE:/workspace" - - # Run the command in docker. - if [[ $COMMAND == *\;* ]]; then - docker run $VOLUMES $OPTIONS --entrypoint=$ENTRYPOINT $IMAGE $COMMAND_PREFIX "$COMMAND" - else - docker run $VOLUMES $OPTIONS --entrypoint=$ENTRYPOINT $IMAGE $COMMAND_PREFIX $COMMAND - fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b596da0..803f04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,6 @@ on: # Allows to run this via the Actions tab workflow_dispatch: -env: - REGISTRY: quay.io - jobs: lint: permissions: @@ -110,28 +107,12 @@ jobs: env: TAG: ${{ github.ref_name }} S3_BUCKET: "s3://cli-dl.stackstate.com/stackstate-backup-cli/" - QUAY_USER: ${{ secrets.QUAY_USER }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.25.x" - - name: Log in to the Container registry - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: quay.io - username: ${{ secrets.QUAY_USER }} - password: ${{ secrets.QUAY_PASSWORD }} - - name: Log in to the Container registry - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: docker.io - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASSWORD }} - name: Go releaser publish uses: goreleaser/goreleaser-action@v5 env: @@ -159,8 +140,3 @@ jobs: run: | echo "aws s3 cp dist/LATEST_VERSION ${{ env.S3_BUCKET }}" aws s3 cp dist/LATEST_VERSION ${{ env.S3_BUCKET }} - - - name: Publish installers to S3 - run: | - echo "aws s3 cp scripts/publish/installers/ ${{ env.S3_BUCKET }} --recursive" - aws s3 cp scripts/publish/installers/ ${{ env.S3_BUCKET }} --recursive